Try having a look at the source code of isetup by Jordan Russell. It has a procedure in the main.pas which is called restartcomputer which sets the required SeShutdownPrivilege for NT and if that fails it creates a reboot32.exe file directly from code in the reboot.inc.
 
It can be downloaded from
 
-----Original Message-----
From: Jeremy Coulter [mailto:[EMAIL PROTECTED]]
Sent: Monday, 17 January 2000 20:49
To: Multiple recipients of list delphi
Subject: [DUG]: Rebooting computer from dos prompt

Hi all.
 
Can anyone tell me how to reboot a computer from a dos prompt in code??
I know how to reboot from an app. but how do you do it from a dos window ??
 
I have a wee consol app. that does some registrationand unregistration of OCX's and it need to reboot once the unreg., copying, and re-reg has taken place.
The code i have wont reboot from a does prompt tho....can anyone help ??
 
Thanks,
 
Jeremy Coulter (manager)
Visual Software Solutions

110 Harewood Road
Christchurch
ph +64 3 3521595
fx +64 3 3521596
cell +21 2533214
http://www.vss.co.nz
 

Reply via email to