Solved

Shut Down NT 4.0 Quick with all programs

Posted on 1998-10-22
2
159 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
delphi prevent click fast 2 238
How to call a form that is in a DLL  from an application? 13 80
enhance the following code 3 37
Firemonkey allowing RTL on android 6 46
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
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…

840 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