LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

turning off a remote PC with LV

HI,

I want to know if anyone knows if it is possible to turn off a remote PC with a LV program. We have one PC supervision that stays always on and 2 other PCs that are on the same network. The other PCs do not have KVM and we need to turn them off once in a while within our application. Right now when we want to turn them off we have to remote desktop and turn them off, not possible when the application is running.

Thanks
0 Kudos
Message 1 of 4
(3,021 Views)
you can use the system exec vi and send the command <shutdown -s>

Message Edited by James R on 11-16-2006 11:30 AM

- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 2 of 4
(3,023 Views)
Thanks James.
I guess I just have to find the way to do it to a remote comp. Maybe usigng the IP address and the "net" something service.
Guy
0 Kudos
Message 3 of 4
(2,993 Views)
you can use the computer name in the shutdown command
 
C:\>shutdown
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-d up:xx:yy]
        No args                 Display this message (same as -?)
        -i                      Display GUI interface, must be the first option
        -l                      Log off (cannot be used with -m option)
        -s                      Shutdown the computer
        -r                      Shutdown and restart the computer
        -a                      Abort a system shutdown
        -m \\computername       Remote computer to shutdown/restart/abort
        -t xx                   Set timeout for shutdown to xx seconds
        -c "comment"            Shutdown comment (maximum of 127 characters)
        -f                      Forces running applications to close without warning
        -d [u][p]:xx:yy         The reason code for the shutdown
                                u is the user code
                                p is a planned shutdown code
                                xx is the major reason code (positive integer less than 256)
                                yy is the minor reason code (positive integer less than 65536)
- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 4 of 4
(2,974 Views)