LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to check remotely that a PC has been restarted after Labview Runtime 2011 has been installed on it?

Solved!
Go to solution

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

0 Kudos
Message 1 of 4
(2,558 Views)
Solution
Accepted by topic author Christ0phe

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

Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Message 2 of 4
(2,549 Views)

Another option is to look at the events on the machine and look for the events indicating the machine rebooted. Windows logs these events.

0 Kudos
Message 3 of 4
(2,539 Views)

Waw, I was not aware of this wmic command.

Thanks a bunch, this does the trick

Christophe

 

0 Kudos
Message 4 of 4
(2,503 Views)