Howto: Installing the Zenworks for Desktops agent via a login script

It’s that time of year again, where we push out new applications as users return from their summer vacations. We deploy programs using Zenworks for Desktops 7.0.1, but a number of machines have the outdated agent or are brand new and don’t have the agent software installed.

My goal was to push out the updated ZfD agent via a Novell login script if it was not at the current version. I found this example at msiwisdom.com and adapted it for my environment. Here’s what my environment looks like:

The current version of the ZfD agent we are using is 7.0.1.60523. To find out what version you are using, view the following registry value on a machine with the current agent:

HKLM\Software\Novell\Zenworks\Version

Next, throw the freeware chkzenag.exe utility into a publicly accessible directory on your network. I put mine in the same directory I have the zfdagent.msi file in, which is not the default of:

sys:\public\zenworks\ZfDAgent\English

My path to the ZfDagent.msi and chkzenag.exe is:

F:\setup\novell\zfd701

Next, I created a very simple .bat file named chkver.bat which I saved in the F:\setup\novell\zfd701 directory. Here’s the contents of that file:

rem ******* begin chkver.bat ******

@f:\setup\novell\zfd701\chkzenag.exe 7.0.1.60523 f:\setup\novell\zfd701\instzfd7.bat

rem ******* end chkver.bat ******

The above .bat file is a single command, even though it wraps in the above example.

Chkver.bat will use the freeware chkzenag.exe program to see if the version of the ZfDAgent installed on the local machine equals the current version. If it does not, it calls my ZfdAgent setup program, a simple batch file named instzfd7.bat, which is also saved in f:\setup\novell\zfd701.

rem ******* begin instzfd7.bat ******

msiexec /i f:\setup\novell\zfd701\ZfDAgent.msi /passive ADDLOCAL=ALL LOGIN_PASSIVE_MODE=0 STARTUP_APPWINDOW=0 MT_SERVER_ADDRESS=middletier.mydomain.com HTTP_PORT=80 NAL_SINGLE_TREE=1 ZENWORKS_TREE=EISD REBOOTPROMPT=Suppress

rem ******* end instzfd7.bat ******

The above .bat file is a single command, even though it wraps in the above example.

If you would like to know what all the settings after the msiexec /i f:\setup\novell\zfd701\ZfDAgent.msi /passive mean, see this.

Finally, I entered this command into the organization’s (O=) login script:

@F:\setup\novell\zfd701\chkver.bat

The login script will check the version of the zfdagent using chkver.bat, and if it is not equal to the current version of 7.0.1.60523 will run instzfd7.bat, which installs the ZfDagent using the windows installer (msiexec.exe). The machine will automatically reboot once the agent installer finishes.

Following the reboot, login to the network as you normally would, and you should see the newly installed ZfD agent software.

Comments [2]

Leave a Reply

Your email address will not be published. Required fields are marked *