01-13-2012 04:03 AM
Hello,
I am deploying a Labview 2011 application on 150 XP-machines in various plants worldwide. Currently all machines still have an old Labview 8.21 runtime (+old DAQmx). I have sent a procedure to my colleagues in the plants so that they install the new runtime (+ new DAQmx). On my side I have built a code to check from my Pc if a certain registry key is present on the 150 PCs which tells me that the new installer ran or not.
The key that I found is:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Installer\Products\1C5E801AE54C4AE43A59FC169F95CA28]
"ProductName"="NI-DAQmx MAX Configuration Support 9.3.5"
"PackageCode"="61EEAEC207A28A842B3341ED6809453D"
"Language"=dword:00000009
"Version"=dword:0923c001
"Assignment"=dword:00000001
"AdvertiseFlags"=dword:00000184
"InstanceType"=dword:00000000
"AuthorizedLUAApp"=dword:00000000
"Clients"=hex(7):3a,00,00,00,00,00
This works well but it does not tell me that the PC has restarted after the installer has been run. If I do not restart the PC and try to execute my Labview 2011 executable I get a long error message (NIDAQmx not registered,...).
As it seems difficult to get the properties of a key to know when it was installed I was rather leaning towards checking if a certain DLL (?) has been registered or not. But it is just a vague idea and I do not know how to put that in place.
I am attaching the current code that I have and that works well but cannot make the difference between Labview 2011 runtime installed and PC restarted or not.
Thanks for the help
Christophe
Solved! Go to Solution.
01-13-2012 05:49 AM - edited 01-13-2012 05:54 AM
You might look for a file that would be created as part of installation to determine the install date/time (ini or other support file created as part of runtime install)
Combine that with a query of the station's uptime and you could calculate if the station has been up longer than the time since the install. Not perfect, but should be possible...
http://en.wikipedia.org/wiki/Uptime#Using_WMI
wmic /node:"my-server" os get lastbootuptime
01-13-2012 08:48 AM
Another option is to look at the events on the machine and look for the events indicating the machine rebooted. Windows logs these events.
01-16-2012 03:44 AM
Waw, I was not aware of this wmic command.
Thanks a bunch, this does the trick
Christophe