05-09-2014 02:48 AM
Hi All,
Hopefully someone can help me. I am creating an installer which includes some properties in the build specs. I also wannt to include some registry keys to be added upon installation:
1. I include the install directory of the application by providing the key with the value [INSTALLDIR]. This seems to work well and I have no problem with this.
2. The other key I would like to include (but I do not know how) is the date and time of installation. Is there a way of automatically including this in a registry key (similar to INSTALLDIR)?
I look forward to your expert advice!
Kind Regards,
Larry
Solved! Go to Solution.
05-09-2014 04:04 AM
Larry,
you can configure an exe to be executed after the installer is finished. So you can write a little application using the Windows registry functions which retrieves the current time stamp and store it in some key(s).
Norbert
05-09-2014 04:13 AM
Hi Norbert,
As you need to be in administrator mode when creating/editing keys in the registry post XP would the fact that you have entered into admin mode for installing the main application leave you in that state when running the post install exe?
Kind Regards,
Larry
05-09-2014 04:24 AM
Larry,
afaik the setting for "Run as Admin" is per OS process. As the "Run Exe after installation" is a different process as the application you installed by it (e.g. "MyApplication.exe"), i wouldn't expect the MyApplication.exe to require/use admin-rights.
Norbert
05-09-2014 04:32 AM
Hi Norbert,
Thanks for the response. I suppose what I could do is precompile the exe with the option for "run as admin" checked. That way when it gets called by the installer it will automatically request administrator rights which would allow the exe to chenge the registry keys.
What do you think?
Kind Regards,
Larry
05-13-2014 04:39 AM
Hi Norbert,
I have tested it now and it seems to work a treat!
Thanks!
Larry