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....

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.