Click here to Skip to main content
15,354,637 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
I am developed a project on visual studio 2008 And sql server 2005.My question is when user install a software the software will uninstall after 1 year and software will install only once in one system?
plz help me!
Posted
Comments
   
Why?!
--SA

you need to set the information in the registry when the software is being installed and poll that information on start up to check expiry.

To make sure that the application is installed only once, create a unique key using the computer name or cpuId of that computer (so that each computer will have a unique key) and set it in a registry location with encryption. When the application is being installed, calculate that key basd on the computer name and check the registry for that key.
   
Comments
NABIN SEN 15-Oct-12 1:39am
   
how to set the information in the registry?
   
I think you need to add installation info (Date etc...) in registry at first installation and probably at each start up of application you need to compare with current date and decide what to do. During uninstallation just leave that info and check again while reinstallation. If the difference is more than a year, don't install.
Encrypt the installation info for security.
   
Comments
NABIN SEN 15-Oct-12 1:41am
   
how to set the information in the registry?
Kumar, Ravikant 15-Oct-12 1:44am
   
Hope it will help you - http://www.codeproject.com/Articles/3389/Read-write-and-delete-from-registry-with-C
http://www.sevenforums.com/general-discussion/170581-registry-editing-command-line.html

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900