Solved

Shut Down NT 4.0 Quick with all programs

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

737 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