954,152 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how can i shutdown PC on the network???pls tnx

Hi everyone...
i'm just a beginner in vb2008 i try to make a program that will shutdown pc in the network and i try the shell command below....

shell("shutdown -m \\PC04 -s")

I type this code but nothing happen it just open a command promt look alike.
PC04 has not been shutted down .pls help me i wanna try this program.
whats wrong with my syntax? do i need to configure PC04?everything is ok in my system properties i checked the remote control property the "allow this computer to control remotely" is already cheked...pls help me

thank you very much..more power....

jhaymayclow
Newbie Poster
5 posts since Jun 2008
Reputation Points: 10
Solved Threads: 0
 

Hi everyone... i'm just a beginner in vb2008 i try to make a program that will shutdown pc in the network and i try the shell command below....

shell("shutdown -m \\PC04 -s")

I type this code but nothing happen it just open a command promt look alike. PC04 has not been shutted down .pls help me i wanna try this program. whats wrong with my syntax? do i need to configure PC04?everything is ok in my system properties i checked the remote control property the "allow this computer to control remotely" is already cheked...pls help me

thank you very much..more power....


hay,
this code will works,
Sub Main()
ExitWindowsEx(ExitWindowsFlags.Shutdown, 0&)
End Sub
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uflags As Long, ByVal dwreserved As Long) As Long
Private Enum ExitWindowsFlags
Shutdown = 1

End Enum

silambharasan
Newbie Poster
17 posts since Sep 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You