PDA

Click to See Complete Forum and Search --> : Very Very Urgetn - Remote System Shut Down


venkatraman_r
Nov 15th, 1999, 05:06 PM
Hi Friends,
I have been asking this doubt for the 10th time i suppose. I got some replied but that was not sufficient for me.

I am in an NT Environment and my computer name is W3. I need to shutdown the computer W5 from my systems i.e. from W3. This should be made possible without loading the client software on W5.

Please someone help me out. I am in the dead end of my project without this.

Thanx in advance..
Venkat.

bertie9
Nov 16th, 1999, 06:50 AM
try the InitiateSystemShutdown API call:

BOOL InitiateSystemShutdown(
LPTSTR lpMachineName, // pointer to name of computer to shut down
LPTSTR lpMessage, // pointer to message to display in
// dialog box
DWORD dwTimeout, // time to display dialog box
BOOL bForceAppsClosed, // force applications closed flag
BOOL bRebootAfterShutdown // reboot flag
);


Get the definition from the API text viewer.
There is more detailed documentation in the MSDN.

Matt

Compwiz
Nov 16th, 1999, 08:59 AM
Or, in Visual Basic the API call is:

Declare Function InitiateSystemShutdown Lib "advapi32.dll" Alias "InitiateSystemShutdownA" (ByVal lpMachineName As String, ByVal lpMessage As String, ByVal dwTimeout As Long, ByVal bForceAppsClosed As Long, ByVal bRebootAfterShutdown As Long) As Long


------------------
Tom Young, 14 Year Old
tyoung@stny.rr.com
ICQ: 15743470 (http://wwp.icq.com/15743470) Add Me (http://wwp.icq.com/scripts/search.dll?to=15743470) ICQ Me (http://wwp.icq.com/scripts/contact.dll?msgto=15743470)
AIM: TomY10 (http://www.aol.com/aim/aim30.html)
PERL, JavaScript and VB Programmer