Click here to Skip to main content
15,902,198 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear

I would like to Shutdown or Restart or Logoff network PCs from my PC. Would you please let me know what would be the VB6 code? I also want to send message to the network PCs with the help of VB6 code.
To shutdown remote PC, I’ve used below code but it doesn’t work. Please help.

‘Code-----------------------------------------------------------
VB
Command1_Click()
Shell ("shutdown.exe -s -m \\192.168.2.2 -t 00") "This IP belongs to remote PC".
End Sub
‘-----------------------------------------------------------

Regards,
Pervez
E-mail: [email removed]
Posted
Updated 1-Jun-14 11:04am
v2
Comments
Nelek 1-Jun-14 17:04pm    
Please don't post email addresses in the questions. It is not a good practice

1 solution

Was that so difficult to perform some search and read some original MSDN documentation? Say, this way: http://bit.ly/1tzCqGp[^].

In particular,
http://support.microsoft.com/kb/317371[^],
http://technet.microsoft.com/en-us/library/cc770416.aspx[^],
http://www.wikihow.com/Do-a-Remote-Shutdown-for-a-PC-on-a-LAN[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900