p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   .NET Framework 2.0 (http://p2p.wrox.com/forumdisplay.php?f=141)
-   -   Writing trial programs (http://p2p.wrox.com/showthread.php?t=57133)

selorm April 26th, 2007 04:34 AM

Writing trial programs
 
I would like my program to write values to a computer registry when it is installed so that the program can run for only a certain number of days. How can i do this? If there is any other way to do write a program so that it works as a trial version, I wouldn't mind using that one as well, provided it works well.

DZukiewicz May 4th, 2007 06:43 AM

You can access the registry through the Registry class.

There is
Registry.LocalMachine (shared)
Registry.CurrentUser (current user)

Then you use the .OpenSubKey( keyname ) and eventually .GetValue() to get the data, which needs casting to the appropriate type.

Regards,

Dominic


All times are GMT -4. The time now is 08:08 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.