PowerBuilder script

509 Views Asked by At

I'm trying to write a script which allows the tool to run only 5 times. If the user tries to run the tool a 6th time, the tool should throw an error as Expired.

Can anyone please help me in this?

1

There are 1 best solutions below

0
On

Create a registry key and control it that way. HKCU\Software\YourApp\timesrun or something like that... Increment it by one everytime the "tool" runs, and throw an exception when it exceeds 5 times.

-Paul Horan-