Solved

Shut Down NT 4.0 Quick with all programs

Posted on 1998-10-22
2
161 Views
Last Modified: 2010-04-06
How can i shut down and restart NT 4.0 Quick with all
programs running ?

Thanks!!!!
0
Comment
Question by:vis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Expert Comment

by:bryan7
ID: 1343887
hey vis, there's a special section for Windows Nt at Experts Exchange.

http://www.experts-exchange.com

bryan

0
 
LVL 1

Accepted Solution

by:
Romanian earned 50 total points
ID: 1343888
Use ExitWindowsEx function with parameters EWX_REBOOT

Sample:
uses Windows;
procedure Reboot;
begin
  ExitWindowsEx(EWX_REBOOT,0);
end;
BTW, process which try reboot computer must have priveleges = SE_SHUTDOWN_NAME
You can set this by AdjustTokenPriveleges function.
If you need sample how to use AdjustTokenPriveleges tell me.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question