Denver - ALARM

cancel
Showing results for 
Search instead for 
Did you mean: 

Rebooting Windows from Labview

Sooo...I was not exactly sure where this would best go, but I thought the community might find it useful.  This little VI runs along the same lines as a VI I wrote to control the brightness of a Windows machine from Labview using the Windows Mangement Instrumentation (WMI) framework.  This VI makes a call on the Win32_OperatingSystem class' Reboot method to restart the computer.  The Reboot method requires no arguments, so we pass an empty string to the arguments field of the ManagementObject.InvokeMethod member.  For a reboot to be successful, we have to make sure that the system has the proper privileges, so, prior to calling this method, we set the member EnablePrivileges in the Management.System.ConnectionOptions class to TRUE.

There is really not much to this, it just took a lot of digging through the WMI documentation to figure out how to do it.  So, if you give it a go, let me know if you run into any issues.

Matt

0 Kudos
Message 1 of 1
(5,591 Views)