PDA

View Full Version : Putting the current date in a registry entry.



AlTheEldr
03-19-2004, 12:46 PM
Is there a way with Express 5.0 to put the date or date and time of the installation into a registry key short of writing a dll to do it? I can't find anything like a Today or a Now macro in the help.

My program uses a CLSID not otherwise associated with the program to hold the date of the first run. If the user attempts to use the program thirty days after that date without purchasing it, the program dies gracefully.

I can continue to do this with the program, but it would be nice to do it with the Install.

Comments on the use of this technique as opposed to others would be appreciated as this is my first attempt at shareware development.

Regarrds,
Al Christoph
Three Bears Software, LLC
just right software at just right prices at too.net and now 3bears.biz

TsungH
03-19-2004, 01:38 PM
You can use MSI properties, Date and Time, to set date and time respectively in registry. For a complete list of MSI properties, please refer to Property Reference (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/property_reference.asp).