Hi all,
I have created my project vb.net backend sqlserver 2000 . act i have done all process. now i want my setup works only available times. Example i need only 2 times.. mean my setup work only times .. how can i do.
Please help me ..
Advance thanks. to all
Scott LyslePosted Apr 23, 2008, 11:36 PM
I don't know if you mean you only want setup to run twice or you want the application to run twice after you set it up on a machine. If you only want it to run twice you can just up a registry entry with a counter. Set the counter to one on the first run, and increment it to two on the second run. Check the registry entry each time it has run and kill and attempts after the first two.
If you only want the installer to run twice, that might be a little more tricky if you have it on a CD and can't write anything to it. You could assign it a guid as an id and set up a web service that will check the number of installations against a database and prevent any installations after the second one but you'd also have to block installations where the application could not connect to the web service.