This set of FAQs provides answers to common support questions asked about NightWatchman, its functionality and its configuration.
2. What is the NightWatchman Management Center?
3. What is the Enterprise View?
4. What systems are supported by NightWatchman?
OS requirements
NightWatchman is supported on workstations running the following Microsoft 32- or 64-bit operating systems: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:
msiexec /i 1EAgent.msi PIDKEY=ABCD-1234-5678-8765-4321 /qn
Where ABCD-1234-5678-8765-4321 represents the valid license key obtained from 1Enwmsvc.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?
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?
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?
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?
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?
15. How do I perform a one-off shutdown without affecting my normal NightWatchman settings?
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?
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?
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?
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?
23. How do I cleanly shutdown applications not supported by NightWatchman?
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.