delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/05/12/20:28:33

From: earnie_boyd AT yahoo DOT com (Earnie Boyd)
Subject: Re: Rebooting from command line
12 May 1998 20:28:33 -0700 :
Message-ID: <19980512143605.8560.rocketmail.cygnus.gnu-win32@send1c.yahoomail.com>
Reply-To: earnie_boyd AT yahoo DOT com
Mime-Version: 1.0
To: Ian Collins <ian AT kiwiplan DOT co DOT nz>
Cc: gw32 <gnu-win32 AT cygnus DOT com>

Hi Ian,

Check out the InitiateSystemShutdown function from the Win32 API.

If you call the function with:

InitiateSystemShutdown( NULL, NULL, 0, TRUE, TRUE );

then no dialog boxes will be displayed, processes will be forced
closed and the system will reboot the local machine.  You must have
SeShutdownPrivilege to execute this command on NT.  It will return
TRUE or FALSE.



---Ian Collins <ian AT kiwiplan DOT co DOT nz> wrote:
>
> As I have to constantly reboot my NT machine, I was wondering if
anyone
> knew a command line utility that can do this?
> (I can't use a GUI utility as I log on remotely with telnet).
> 
> -
> For help on using this list (especially unsubscribing), send a
message to
> "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
> 

==
-        \\||//
---o0O0--Earnie--0O0o----
--earnie_boyd AT yahoo DOT com--
------ooo0O--O0ooo-------



_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019