NightWatchman FAQ

This set of FAQs provides answers to common support questions asked about NightWatchman, its functionality and its configuration.

1. What is NightWatchman?

NightWatchman is a desktop service that allows administrators to control the power state of PCs on a network. NightWatchman is installed on each client. It may be installed remotely and silently enabling easy power management control over a large number of machines. Using NightWatchman it is possible to achieve 100% known state for all workstations. This assists in desktop management, software delivery and energy saving.

2. What is the NightWatchman Management Center?

The NightWatchman Management Center provides a console for managing computers and a reporting website. Using the console you can define power schemes and power policies and apply them to computers running NightWatchman. The reporting website provides a number of cost, power consumption and emissions savings reports that let you measure NightWatchman’s effectiveness on your company network and demonstrate your company’s green credentials.

3. What is the Enterprise View?

The Enterprise View is a web-based console that provides a set of active tiles targeted at CXO level managers summarizing cost, consumption and emissions savings achieved by NightWatchman.

4. What systems are supported by NightWatchman?

OS requirements

NightWatchman is supported on workstations running the following Microsoft 32- or 64-bit operating systems:
  • Windows 7 (Professional, Enterprise and Ultimate)
  • Windows Vista (Business, Enterprise and Ultimate)
  • Windows XP SP3
NightWatchman will not install on any Microsoft Server systems.For servers you should use NightWatchman Server Edition NightWatchman is now available for Apple Macintosh computers, and is supported on workstations running the following Apple Macintosh operating systems:
  • Mac OS X 10.6.3, 10.6.4
  • Mac OS X 10.5.8
System requirements

The machine NightWatchman runs on must be APM/ACPI compliant.

Security requirements

NightWatchman is a service that is installed on desktop computers. To install NightWatchman successfully you will need administrator privileges for the computer on which NightWatchman is to be installed. Once installed NightWatchman does not need any further administration privileges.

5. How do I install NightWatchman?

NightWatchman is a component of the 1E Agent. Installing NightWatchman is either done interactively by double-clicking on the 1E Agent installer file and following through the on-screen wizard, or silently using the msiexec command-line

The simplest way to install interactively is to accept all the defaults in the wizard - this will cover 80% of the normal NightWatchman usage. Alternatively you can choose the custom install to initialize the most commonly used NightWatchman settings by hand.

To install silently on windows, without interaction, you can use a command-line similar to the following:

msiexec /i 1EAgent.msi /qn

Full details on the NightWatchman installation are provided in The 1E Agent Installation Guide,, which also shows the flags for controlling the 1E Agent silent installation.

6. How do I license NightWatchman?

The NightWatchman installation is provided with a default 30-day evaluation license. If you want to purchase a full license or require further time to complete your evaluation, please contact info@ahtech.com.au.

NightWatchman can be registered with the new license key in the following ways:

  • When installing NightWatchman interactively the License Key can be manually entered on the Component Selection screen. If you leave this field blank, you will be given a free 30-day evaluation period from the date of first installation - this last method will not work once the initial evaluation period has expired.
  • Silently using the windows installer command-line:
  • msiexec /i 1EAgent.msi PIDKEY=ABCD-1234-5678-8765-4321 /qn

    Where ABCD-1234-5678-8765-4321 represents the valid license key obtained from 1E
  • After installation on the command-line. This enables you to apply the new license without uninstalling NightWatchman. Change the directory to the NightWatchman installation and run the following command:
  • nwmsvc.exe -relicense=ABCD-1234-5678-8765-432 Where ABCD-1234-5678-8765-4321 represents the valid license key obtained from 1E.

7. How do I tell if I need to relicense NightWatchman?

When NightWatchman is running in evaluation mode it will write something equivalent to the following in the NightWatchman log file:

Initialising Version 6.0 (Mth Date Year) on <ComputerName> X days left

Where <ComputerName> represents the name of the machine where NightWatchman is running. The X days left indicates how many days are remaining in the evaluation period. After this time period you will need to relicense NightWatchman to continue.

The NightWatchman log files NightWatchman.LOG can be found in theC:\ProgramData\1E\Agent\NightWatchman directory.

8. How does NightWatchman operate?

WakeUp has two components, the wakeup server and the agent.
  1. The scheduling or requesting of shutdowns.
  2. The actions taken to log-off a user.
  3. The automatic saving of unsaved user documents.
  4. The actions taken to shut down the machine.

9. What are NightWatchman shutdown scripts?

The functionality of the NightWatchman service can be extended by creating additional shutdown scripts. Administrators can write Windows scripts in either JScript or VBScript to handle the intelligent shut down of applications, so that no data is lost when performing a user log-off.

The scripts can handle eventualities such as saving current versions of all open files, as well as making backups of previously saved versions so users can back out of latest changes if they prefer not to keep them. Any open dialogs are also handled in order to execute the closure of the application in a safe way.

NightWatchman is provided with pre-defined scripts that handle the following products: Microsoft Outlook, Microsoft Word, Microsoft PowerPoint, Microsoft Excel and Notepad. To handle other applications you can either contact 1E or write your own additional scripts using the details provided in The 1E Agent Scripting Reference for Microsoft Windows. or The 1E Agent Scripting Reference for Apple Macintosh.

10. How do I put all my PCs into a low power state in the evening?

The best way to do this is to use the NightWatchman Management Console to set a power policy for all computers running NightWatchman. Alternatively you can run a NightWatchman command on all the PCs.

To do this you use a combination of the -shutdowntime and the -shutdownaction flag. The shutdowntime flag sets the time to go into the low power state. The shutdownaction flag specifies the computers resulting power state. On each computer, change directory to the NightWatchman installation and run the following command:

Nightwatchman.exe -shutdowntime=20:30 –shutdownaction=POWEROFF

This example sets NightWatchman to power off the computer at 8:30 pm.

The command-line switches to configure NightWatchman can be sent from any systems management console to all the machines requiring management.

11. How do I put a machine into hibernate or standby mode?

In addition to the shutdownnow command, NightWatchman has two commands that act immediately to put a PC into hibernate or standby mode. These commands are called hibernatenow and standbynow.

For example the following command prompts NightWatchman to immediately put the local PC into hibernate mode:

NightWatchman.exe - hibernatenow

12. What is PC insomnia and how does NightWatchman help?

Throughout the day, PCs can be configured to go to sleep after a period of inactivity in order to save power. However some running processes can prevent this from happening, for example a virus scan or application activity. This is commonly referred to as ‘PC insomnia’ or ‘sleeplessness’. NightWatchman will detect these processes and stop them from preventing the computer from going into low power states. This will ensure that PCs are available during the day, doing what they need to in order to support your business. Overnight and at weekends you can be confident they are in a lower power state saving energy, saving money and saving the environment.

13. Can I use NightWatchman as part of my computer maintenance regime?

Yes. NightWatchman provides a maintenance window feature where you can wake up a computer at a configurable time and then put it back into a low power state when the maintenance window has finished. During this window NightWatchman overrides the computer’s power scheme to prevent it from going into a low power state. This lets you power down computers at a given time in the evening while still ensuring they are available for patching or scheduled maintenance outside office hours and then return them to a low power state afterwards. This maximizes the power savings while ensuring greater software distribution and patch success.

14. Can I use NightWatchman to ensure that computers are available at the start of the day?

Yes. NightWatchman provides an alarm clock feature where you can wake up a computer at a configurable time. NightWatchman overrides the computer’s power scheme to prevent it from going into a low power state for an hour after the alarm clock starts. This lets you power down computers at a given time in the evening while still ensuring they are available for users when they come in to work the following morning.

15. How do I perform a one-off shutdown without affecting my normal NightWatchman settings?

NightWatchman has a new command, onceoff, that enables one-off shutdowns with custom shutdown settings. You can customise the one-off shutdown using the logoffaction, shutdownaction, countdownsecs and shutdownmsg switches.

For example, the following NightWatchman command-line sets a one off shutdown where the logoffaction for that shutdown only will be force, and the shutdown will occur at 7:30 pm:

nightwatchman.exe –onceoff -shutdowntime=19:30 -logoffaction=force

16. How do I force users to log-off in a secure environment?

Change the directory to the NightWatchman installation and run the following command to enforce a shutdown on all machines at 8:30 pm allowing no user intervention via the system tray interface:

nightwatchman.exe -shutdowntime=20:30 -logoffaction=force -systemtray=OFF

In contemporary secure environments it is a requirement that users are logged off from systems when they leave the office. NightWatchman can log-off users even if the system has been locked, or if a password-protected screensaver is in use. NightWatchman can force the system to shut down if you want to be absolutely sure that your systems are shutdown each day at the same time. NightWatchman will save any open user data and close applications using the NightWatchman scripts.

17. How do I enforce a company wide power scheme?

Use the NightWatchman Management Center to define power schemes and power policies and apply them to all the computers in a company.

18. How do I set the NightWatchman shutdown days?

The shutdowndays command-line switch sets the days of operation where the scheduler will fire. The days are specified as integers, where 0 = Sun, 1 = Mon, 2 = Tue etc. The days may be set individually separated by commas or as a range separated by a dash.

Change the directory to the NightWatchman installation and run the following command:

nightwatchman.exe -shutdowndays=2,3,5

This command sets the scheduler to run on Tuesday, Wednesday and Friday only.

The following command sets the scheduler to run all days between Monday and Friday.

nightwatchman.exe -shutdowndays=1-5

The default is for the scheduler to run all days.

19. How do I use NightWatchman to put a computer into a low power state immediately?

The shutdownnow, standbynow or hibernatenow command-line switches sets the system to power off, standby or hibernate immediately.

For example the following command will cause a computer to power off::

nightwatchman.exe -shutdownnow

20. Is it possible to use NightWatchman to shut down a machine more than once a day?

NightWatchman does not specifically support the scheduling of multiple shutdowns during a day. You can however write a batch file that invokes NightWatchman with the -shutdownnow command line option. This could be easily implemented using a scheduled advertisement in Microsoft Systems Management Server.

21. How do I install NightWatchman to shut down at a specific time?

The NightWatchman shutdown schedule can be configured during a custom interactive installation using the installer wizard or using flags passed on the msiexec command line. To use the first method you select custom install and then follow the on-screen instructions in the 1E Agent installer wizard. The second method requires that you pass the SHUTDOWN_HOUR and SHUTDOWN_MIN parameters to msiexec, as follows:

msiexec /i 1EAgent.msi PIDKEY=ABCD-1234-5678-8765-4321 SHUTDOWN_HOUR=18 SHUTDOWN_MIN=30 /q

Where ABCD-1234-5678-8765-4321 represents the valid license key obtained from 1E.

22. What does NightWatchman do to my open files when a shutdown occurs?

NightWatchman comes with a set of scripts that are used to save your open files. In order to avoid overwriting your original files with unwanted changes, these are saved to a holding area. When you log back on, NightWatchman gives you the opportunity to re-open these saved files.

23. How do I cleanly shutdown applications not supported by NightWatchman?

You can write scripts that extend the behaviour of NightWatchman to include currently unsupported applications. For more details on writing NightWatchman scripts please refer to The 1E Agent Scripting Reference for Microsoft Windows or The 1E Agent Scripting Reference for Apple Machintose.

24. How do I change the default NightWatchman backup directory?

Changing the backup directory is done by modifying the scripts that come with NightWatchman. The NwmScript.BackupDirectory variable returns the default location where the NightWatchman backups are to be saved. This directory is set by NightWatchman as:C:\documents and settings\<username>\application data\1e\NightWatchman\ Where <username> refers to the current user`s logon name.

If you want to change the save location for the NightWatchman backups you should change the code that sets the dumpdir variable, as shown in the last line of the above code fragment, to a location of your own choosing. For example, the following code sets the dumpdir variable to point to another temporary location:

dumpdir = “u:\temp”

Note: this example specifies the use of the user mapped drive u: You can of course set this to any mapped drive the user may have set up on their PC. The advantage of using a user mapped drive is that users of the PC will be able to keep their NightWatchman backup files separate from all other users.


Security ensures IBM i users meet all their compliance requirements, have the security and audit mechanisms guaranteeing sensitive data is adequately secure

> VIEW MORE

VRTech is a software company specializing in the development of software products and solutions for heterogeneous (AS/400, Mainframe, Unix and Windows) computing environments.

> VIEW MORE