Beyond Logic

Beyond Logic Shutdown for NT/2000/XP

The Windows 2000 Professional Resource Kit and Windows XP introduce a shutdown.exe command line utility to shutdown local and/or remote computers. This utility can be used in conjunction with the task schedular or AT service to shutdown computers after hours to help conserve power (money, and the environment) or to reboot your computer after hours to make it more reliable.

However a quick play with these utilities will fine that they are less than adequate. First, they provide limited options to shutdown, reboot or logoff. However shutdown does not actually turn your ACPI compliant computer off but rather displays the “It is now safe to turn off your computer” message. There is no recourse for the user to cancel the operation, or an opportunity to target idle computers without logged on users.

The limited and bland dialog from standard Microsoft Utilities using InitiateSystemShutdown API.

The Beyondlogic shutdown utility on the other hand provides :

  • Options to shutdown, power-off, reboot, suspend, hibernate, log-off or lock the workstation.
  • Actually shutdowns ACPI Compliant computers including WinNT4 with the hal.dll.softex Hardware Abstraction Layer.
  • Ability to display optional message of a maximum 300 characters.
  • The shutdown dialog will appear on the active window, should it be the login window, login screen saver, logged in user's desktop, or on a locked workstation.
  • Option to allow the user to cancel the operation. (This can be greyed out)
  • Option to prevent shutdown action occurring on logged-on computers giving your users the flexibly to run lengthy processes overnight without being disturbed.

The beyondlogic shutdown dialog, giving your users the option to cancel your action

This utility is based on the shutdown module of the popular beyondexec. If you need to shutdown multiple computers it is recommended to use beyondexec


Using the industry standard /? switch will show the utilities parameters. A summary is shown on the right.

Without any switches specified, a cancellable shutdown action with a 60 second countdown will be selected. Windows 2000 and XP users should always use the shutdown switch to turn off your computers. The PowerOff switch is only provided to shutdown Windows NT4 with the softex hardware abstraction layer installed. (See more details below)

The -c switch can be used to Gray out the cancel button preventing users from cancelling the shutdown once initiated. The -i switch first checks to see if the shell (explorer.exe) is running to establish if a user is logged into the workstation. If a user is logged in, the application exits without displaying anything. This can be used to give you users the freedom to run programs on the PC overnight or can be used to only shutdown idle machines while not annoying users logged in and working away.

Scheduling a Shutdown on Windows NT/2000/XP

Windows 2000 and XP contains a GUI task scheduler. However this scheduler doesn’t provide the option to allow processes the right to interact with the desktop. Therefore you need to use the AT service bundled with NT4/2000 and XP instead.

C:\ at 18:00 /interactive /every:M,T,W,Th,F,S,Su c:\windows\shutdown.exe -i -l 600 
 -m “Management acknowledges your dedication to your work. However if you choose to 
  go home now and have a good night, you will be much more productive tomorrow.”

The above example shows how you can schedule a shutdown to occur at 6:00pm each night. In this example shutdown.exe has been copied to c:\windows (Windows XP).

In medium workgroups and larger organisations, the above solution requires shutdown.exe to be copied to all your computers and the scheduler set up on each computer. Each computer will then shutdown based on it's own system clock. While many sites sync the workstation clock at log-in, flat CMOS batteries can be a problem for those sites who don't. It can also be a large task to change the configuration should you need to reschedule around an event.

Another solution is the popular beyondexec which can be used to run processes or shutdown multiple workstations on a single or group of remote workstations. In this case you could run a single scheduled task on a NTP sync'd server to shutdown your group of computers. If you need to change the scheduled time there is only one setting to change, and it gives you the flexibility to shutdown the workstations on demand such as moments before a scheduled power outage. The other advantage is there is absolutely nothing you have to install on your remote computers.

Trouble Shooting
    Powerdown on Windows NT 4 / Soft-Off

    Windows NT 4 can be made to switch itself off after shutdown should your computer supports power management. When Service Pack 6/6a is extracted you will find a hal.dll.softex file. If you replace \winnt\system32\hal.dll with a copy of this file, using -d poweroff with beyondexec will shutdown and poweroff your ACPI Windows NT 4 Workstation. Failure to replace the hal.dll will result in the poweroff action rebooting your Windows NT computer.

    Locked Workstations

    When a workstation is locked, the shutdown, reboot and logout actions will not function correctly unless the -f (force applications to terminate) switch is specified. The suspend and hibernate actions will function correctly on a locked workstation. This is a problem associated with the ExitWindowsEx() API provided in Windows.


  • Version 1.01, 18K bytes. (Freeware)
    • Revision History
      • 16th November 2003 - Version 1.01
        • First release to public. Extracted the shutdown module from BeyondExec for standalone use.

    Other Unique and Innovative Software Solutions from Beyond Logic
    • Trust-No-Exe - An executable filter for Windows NT/2000/XP
      Allow users to run trusted applications from defined directories, while preventing the execution of non-trusted programs from floppy disk and CDROM drives or from the users e-mail attachment directory. Stop PE viruses in their tracks where on Windows platforms year, nine out of ten of the top viruses were spread via e-mail.

    • Command Line Process Viewer/Killer/Suspender for Windows NT/2000/XP
      Want a command line utility to view, kill, suspend or set the priority or affinity of processes, perhaps from a batch file? Kills rouge processes where Window's Task Manager fails.

    • BeyondExec - Spawn Processes and/or Shutdown Remote Windows NT/2000/XP WorkStations.
      Have you ever wanted to run a process such as an application installer, service pack, virus signature update etc or shutdown a single or group of remote computers without having the burden of installing any remote client on your target computers?

    • Bmail - Command Line SMTP Mailer for Batch Jobs
      Bmail is a free but lean command line SMTP mail sender. Bmail allows the user to automate the sending of email messages containing log files, data downloads or error messages on Win32 based computers.

    • Delete/Copy by Owner utility for Windows NT/2000/XP
      Have you ever had the need to find, copy or delete files that were owned by a certain user? A great way to back up files created by previous employees or to clean workstations when one leaves.

    • PortTalk - A Windows NT/2000/XP I/O Port Device Driver
      A problem that plagues Windows NT/2000/XP, is it's strict control over I/O ports. Unlike Windows 95, 98 or ME, Windows NT/2000/XP will cause an exception (Privileged Instruction) if an attempt is made to access an I/O port that your program is not privileged to access. The PortTalk driver allows existing programs to access selected I/O ports.

    • Console Computer Information Utility for 2000/XP
      Want a quick console utility to display the hardware specifications of a PC including Processors Type, Operating System and Service Pack, Physical and Virtual Memory, Network Addresses, Logical Drive information, Video Card Type, Hard Disk, CDROM and Printer Information.

    Copyright 2002-2007 Craig Peacock - 6th April 2007.