This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: reboot, anyone?


Arlindo,
There is a shutdown command that comes w/ the resource kit.
shutdown \\remotemachine /r /t:05 /y

/r - reboot
/t:05 - in 5 seconds
/y - yes I REALLY mean SHUTDOWN!!!

If you don't have access to the resource kit, you can write a down & dirty
shutdown using InitiateSystemShutdown.  The URL
http://premium.microsoft.com/msdn/library/sdkdoc/shutdown_0h88.htm shows an
example of this.  (If you don't want to register w/ microsoft, here's the
prototype

// Following from microsoft's site:
fResult = InitiateSystemShutdown( 
    NULL,                                  // shut down local computer 
    "Click on the main window and press \
     the Escape key to cancel shutdown.",  // message to user 
    20,                                    // time-out period 
    FALSE,                                 // ask user to close apps 
    TRUE);                                 // reboot after shutdown 
 
if (!fResult) 
{ 
    ErrorHandler("InitiateSystemShutdown failed."); 
}

Hope this helps.
(Wow - I could actually answer a question on this group! (hope I'm right :-)
BTW, since I'm here - thanks to all for the hard work & great patches &
info.)

-Tony
> ----------
> From: 	Arlindo da Silva[SMTP:arlindo@niteroi.gsfc.nasa.gov]
> Sent: 	Thursday, April 16, 1998 11:14 AM
> To: 	gnu-win32@cygnus.com
> Subject: 	reboot, anyone?
> 
> Hi,
> 
>    I'm looking for a command line, no questions asked, "reboot" utility
> for
> NT.  I'd like to be able to reboot my NT box remotely from a telnet shell.
>    
>    It is important that it skips the dialog box as I won't be there to
> click
> the "OK" button.  Can this be done?
> 
>       Thanks.
> 
> -- 
> Arlindo da Silva    
> dasilva@alum.mit.edu
> 
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".
> 
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]