NightWatchman FAQ

This set of FAQs provides answers to common support questions asked about NightWatchman, its functionality and its configuration. Further support is available via the 1E knowledge base which you can request us to search by sending an email to support@transend.co.nz, or you can contact 1E directly at support@1e.com.
 
1.What is NightWatchman?
2.What systems are supported by NightWatchman?
3.How do I install NightWatchman?
4.How do I license NightWatchman?
5.How do I tell if I need to relicense NightWatchman?
6.How does NightWatchman operate?
7.What are NightWatchman shutdown scripts?
8.How do I shutdown all PCs in the evening?
9.How do I put a machine into hibernate or standby mode?
10.What is PC insomnia?
11.How do I perform a one-off shutdown without affecting my normal NightWatchman settings?
12.How do I force users to log-off in a secure environment?
13.How do I enforce a company wide power scheme?
14.How do I set the NightWatchman shutdown days?
15.How do I set the NightWatchman shutdown time?
16.How do I request an immediate shutdown?
17.How do I pre-license NightWatchman for use in a baseline PC image?
18.Is it possible to use NightWatchman to shut down a machine more than once a day?
19.How do I install NightWatchman to shut down at a specific time?
20.What does NightWatchman do to my open files when a shutdown occurs?
21.How do I cleanly shutdown applications not supported by NightWatchman?
22.How do I turn off the system tray icon?
23.How do I change the default NightWatchman backup directory?
 
1.  What is NightWatchman?
NightWatchman is a client-side 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.
Back to top
 
2.  What systems are supported by NightWatchman?
OS requirements
NightWatchman should install and be configurable on any Workstation running the following Microsoft operating systems:
• Windows Vista (Business, Enterprise, Enterprise x64 and Ultimate)
• Windows XP SP2 and above 
NightWatchman will not install on any Microsoft Server systems.
System requirements
The machine NightWatchman runs on must be APM/ACPI compliant.
Security requirements
NightWatchman is a service that is installed on client machines. To install NightWatchman successfully you will need administrator privileges for the PC on which NightWatchman is to be installed. Once installed NightWatchman does not need any further administration privileges.

Back to top
 
3.  How do I install NightWatchman?
Installing NightWatchman is either done interactively by double-clicking on the 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, without interaction, you can use a command-line similar to the following:
msiexec /i NightWatchman50.msi /qn
Full details on the NightWatchman installation are provided in The NightWatchman Installation Guide, which also shows the flags for controlling the NightWatchman silent installation.
Back to top
 
4.  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 sales@transend.co.nz.
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 User Information 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 NightWatchman50.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-4321
 
 Where ABCD-1234-5678-8765-4321 represents the valid license key obtained from 1E.
 
Further details on licensing NightWatchman are provided in The NightWatchman Installation Guide
Back to top
 
5.  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 5.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 and NightWatchman50.LO_ can be found in the C:\Documents and Settings\All Users\Application Data\1E\NightWatchman directory.
Back to top
 
6.  How does NightWatchman operate?
NightWatchman allows the administrator complete control over the power state of PCs. There are four configurable phases to NightWatchman operations:
 
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. 
 
Back to top
 
7.  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 NightWatchman Scripting Reference.
Back to top
 
8.  How do I shutdown all PCs in the evening?
To do this you use the -shutdowntime flag. For example, change the directory to the NightWatchman installation and run the following command:
Nightwatchman.exe -shutdowntime=20:30
This example sets NightWatchman to shutdown 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.
This is the most frequently used configuaration for NightWatchman. Powering off PCs saves energy and ensures that the PCs have a clean start each day. NightWatchman shuts down PCs without losing the unsaved work of logged on users; executing scripts to make sure that any active applications are closed in a safe fashion.
Back to top
 
9.  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
Back to top
 
10.  What is PC insomnia?
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’. In order to get the best possible power savings we recommend implementing an end of day scheduled PC power down using NightWatchman. 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.
Back to top
 
11.  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=19:30 -logoffaction=force
Back to top
 
12.  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.
Back to top
 
13.  How do I enforce a company wide power scheme?
Aside from powering off machines and logging off users, NightWatchman can also control the power schemes currently in use. This means that the settings for power conservation, such as putting the monitor, hard disks and computer into standby mode, can be unified into an enforceable company wide scheme.
The switches available for managing the power schemes mirror the options that are available to the user through the system property dialog. They are divided into two main groups: switches that control the settings when the machine is on mains power, and those that control the settings during battery operation.
Change the directory to the NightWatchman installation and run the following command:
nightwatchman.exe -powerscheme=ON -monitorac=5 -diskac=10 -standby=15
Back to top
 
14.  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.
Back to top
 
15.  How do I set the NightWatchman shutdown time?
The shutdowntime command-line switch sets the time when the scheduler will trigger the shutdown. This switch can be configured to never shut down or to shut down at a specific time. The time must be given in 24 hour format, with the hours separated from the minutes by a colon.
Change the directory to the NightWatchman installation and run the following command:
nightwatchman.exe -shutdowntime=18:30
This command line schedules a shutdown at 6:30 pm.
The following command turns scheduled shutdowns off:
nightwatchman.exe -shutdowntime=OFF
Back to top
 
16.  How do I request an immediate shutdown?
The shutdownnow command-line switch sets the system to shutdown immediately. It is equivalent to using the shutdowntime switch with the "NOW" value.
Change the directory to the NightWatchman installation and run the following command:
nightwatchman.exe -shutdownnow
This command prompts an immediate shutdown of the system.
Back to top
 
17.  How do I pre-license NightWatchman for use in a baseline PC image?
If you're installing NightWatchman onto a baseline image that will then be deployed to other PCs in your network, you will have to preset the license information in the registry.
You can do this by installing and then stopping the NightWatchman service on the baseline PC, and then by editing the registry as follows:
 
1. Delete the HKLM\SOFTWARE\1E\NightWatchman\LicData\LicData2 key 
2. Set the value HKLM\SOFTWARE\1E\NightWatchman\LicData\LicData to 00 00 00 00 00 00 00 00. 
3. Set the string value HKLM\SOFTWARE\1E\NightWatchman\LicData\MSIPidkey to a valid license key. 
When the image is applied to the new machine, and the machine has been given its new name, NightWatchman will validate the new license key when it is started for the first time.
Alternatively, you can use the command-line -relicense option once the image has been restored.

Back to top
 
18.  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.
Back to top
 
19.  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 NightWatchman installer wizard. The second method requires that you pass the SHUTDOWN_HOUR and SHUTDOWN_MIN parameters to msiexec, as follows:
msiexec /i nightwatchman.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.
Back to top
 
20.  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.
Back to top
 
21.  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 NightWatchman Scripting Reference.
Back to top
 
22.  How do I turn off the system tray icon?
To turn off the system tray icon, change the directory to the NightWatchman installation and run the following command:
nightwatchman.exe -systemtray=OFF
Back to top
 
23.  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.
Back to top
 
Back to Software Solutions