LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to include install date and time in registry keys

Solved!
Go to solution

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


Larry Colvin
Associate Principal Engineer
Dyson Technology Ltd.

0 Kudos
Message 1 of 6
(3,410 Views)
Solution
Accepted by topic author Larry.C

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(3,394 Views)

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


Larry Colvin
Associate Principal Engineer
Dyson Technology Ltd.

0 Kudos
Message 3 of 6
(3,387 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 6
(3,381 Views)

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


Larry Colvin
Associate Principal Engineer
Dyson Technology Ltd.

0 Kudos
Message 5 of 6
(3,377 Views)

Hi Norbert,

 

I have tested it now and it seems to work a treat!

 

Thanks!

 

Larry


Larry Colvin
Associate Principal Engineer
Dyson Technology Ltd.

0 Kudos
Message 6 of 6
(3,335 Views)