From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shutting down PC from LabVIEW

In my application i want to shut down the PC Automatically when i press certain button provided on the user interface how can i achieve it.
0 Kudos
Message 1 of 5
(2,878 Views)
Assuming you're using windows, a quick search for shutdown in the windows help reveals a shutdown command, which you can call in LV using the system exec VI for the communication palette.

___________________
Try to take over the world!
0 Kudos
Message 2 of 5
(2,872 Views)

Hi

Thanks A lot

but a small doubt, i dont think its common for all versions of Winows i want somethin that should work with win2k, winXP and win2003 server.....

is there anything that is independant of these versions of OSs

thanks a lot once again

0 Kudos
Message 3 of 5
(2,845 Views)
There isn't an independant one, so far as I know...but there may be.

What you could do is use System Exec and the "ver" command, to get the version, and from there use the appropriate command.  Windows XP uses "shutdown -s", while for 2k it's a little more complicated.  See here.

I've never had any experience with 2003 server myself, so I can't help you there.

Message Edited by Novatron on 08-31-2005 08:19 AM

0 Kudos
Message 4 of 5
(2,838 Views)

Another way of getting the version is using the Application>>OS properties.


___________________
Try to take over the world!
0 Kudos
Message 5 of 5
(2,827 Views)