WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Reboot and Shutdown Topics

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

NT Shutdown and Restart

Keywords: 	 NT Shutdown and Restart

Question:

Does anyone know if it is possible to schedule an NT server to perform the "Shutdown and Restart" routine without using the "Sendkeysto" command? I would like to schedule a server to reboot periodically, but would like to do so without having to "unlock" NT.

Answer:

Ummm Give up on SendKeys and try something like:
  1. IntControl(67,0,1,0,0)
    
    when you want the reboot to occur.

    OR

  2. You only need a "shutdown utility" (like shutdown.exe supplied with Windows NT Server Resource Kit). NT supplies a scheduler called "AT" (of course the scheduler service has to be started first, or in your case its startup should be set to automatic).

    Refer to the /? option of both utilities for more information.


Question:

I am looking for a solution to save some usersettings in ini-files to the roaming profiles (we have to support some old 16-bit apps.) With Winbatch I have some ideas, but how to call a shutdown/logoff script with NT....

While surfing around I found a freeware stuff calling GINA (see www.jsiinc.com/TIP0400) which allows to install on a friendly way (setup) to plug-in your own Login or/and Shutdown script. IT REALLY WORKS!

My question is, do you know another (better) way or program which is doing the same thing? Thanks in advance

Answer:

  1. Shutdown can be accomplished with the utility shutdown.exe and Logoff with ntexit.exe, both utilities being part of the Windows NT Resource Kits. As for Login, aside from entering the username and password, you can easily modify/add a couple of registry keys before quitting Windows to enable AutoLogon. Refer to Microsoft's web site for more details on AutoLogon.

  2. You might check the WinBatch IntControl 1005. Because of the way NT shuts down - one application at a time - we have not been able to find a way around the Winbatch 'Shutdown Notification' when writing a script to run on logoff/shutdown.

    NOTICE:

    IntControl 1005 was removed from documentation as it did not work as people wished. It worked on on Windows 95/98/ME machines, but was not at all satifactory on NT/2000/XP/2003 machines.

    WORKAROUND:

    This is a possible workaround for IntControl 1005 on NT platforms. The idea is to Launch a WinBatch service (.exs) and have it monitor for the Shutdown/Logoff message, execute any shutdown/logoff code then exit! You can install the service on the fly using wntSvcCreate then start it using wntSvcStart. http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Functions+IntControl~1005.txt



Article ID:   W13316
Filename:   NT Shutdown and Restart.txt
File Created: 2014:07:18:09:51:38
Last Updated: 2014:07:18:09:51:38