Novell is now a part of Micro Focus

Logging Application Distribution in ZENworks

Articles and Tips: tip

Anders Gustafsson
Novell Sysop, Sweden

01 Jul 1999


Novell's ZENworks has proven to be a valuable tool for application distribution in networks of all sizes. With this product, you can perform anything from a simple registry change or single-file update to a full application install that can be pushed out to a number of workstations with minimal effort.

When distributing applications, it is often desirable to have a log that can tell you which applications are being installed and on which computers, as well as when the applications are installed and by whom. While this feature may be included in a future version of ZENworks, you can accomplish the same thing using the standard functions that are found in the current version (v1.1). This NetNote outlines a simple application logging method.

Setting Up the Log File

In this suggested logging method, the information is added to a straight text file which can later be imported into a database or spreadsheet for easier analysis. This file needs to be in a directory to which all users have write access, such as SYS:\COMMON\LOG. You can have one file per application or one central file which logs information about all applications.

In this example, we will use the "Text File" manipulation built into ZENworks and append additional information to an existing file named COOL.LOG. We will set the text file to "Track distribution per user" because we want to install the fictitious CoolApp application on a per-user basis.

The string that we place in the text file can contain NDS variables and regular login-script variables. For our sample application, the string might look like this:

  • Installed CoolApp for %CN% on %MACHINE%-%P_STATION%

This will produce the following line of information for a user named DALTON:

  • Installed CoolApp for DALTON on Daltons-0020AFF79113

This line can then be appended to the COOL.LOG file, assuming that you set the %MACHINE% environment variable in the AUTOEXEC.BAT file.

You can pull the machine (computer) name from the Windows registry by using a technique outlined in TID (Technical Information Document) #2942990. Following the TID example, you would put the following two lines in the login script:

  • REGREAD "HKLM,System\CurrentControlSet\control\ComputerName\ComputerName,ComputerName"DOS SET MACHINE="%99"

The data read from the registry will be placed in the variable %99, which can then be used as the DOS variable for MACHINE.

To read the current time that the application is installed, add the following line to the log file:

  • %MONTH%/%DAY%/%YEAR%, at %HOUR%:%MINUTE%

Now, as ZENworks installs the application, it writes the information to the COOL.LOG file in the G:\COMMON\LOG directory, which you can then peruse or pull into a database or spreadsheet program.

(Thanks to the all people at the Novell support forums who provided input on this NetNote.)

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Micro Focus