Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Novell: ZENworks FAQ


Zenworks 4x - 7.x Workstation Agent Automated Deployment by Provogeek
Posted: 24 Jan 08 (Edited 24 Jan 08)

The following script will greatly ease the deployment of the Zenworks Agent to a Novell NetWare Network.  It can also be used in a Microsoft Windows Network with little modification.  It can also be used in a current Zenworks deployment being called by NAL instead of executed through the login script.

The script can be compiled into a stand-alone executable using the Free ware software called AutoIT.  You can find this software here http://www.autoitscript.com/autoit3/


#cs --------------------------------------------------------------------------------------------------------------------------------------------------------

 AutoIt Version: 3.1.0

 Author:        Brent Schmidt <Brent [AT] kiscc [DOT] com>

 Company:    KIS Computer Center
 Date:        4/11/07

 Script Function:

    Zenworks Workstation Agent Automated Install

This script is intended to be used in a system login script to detect workstations that do not have the ZFD Agent installed, check workstation For

minimum requirements and report any errors it encounters,  if the agent is already installed, the script will bypass any attempts to install the agent.

Change Log:

6/8/05 - original version

7/20/05 - removed LANdesk detection and removal

11/29/05 - added OS version, support pack, and IE version detection and error reporting

12/20/06 - added alternate credential installation support

4/11/07 - Added failed authentication detection and reporting for alternate credentials.

4/16/07 - Optimized code


Declaration of variables to be used for the checking function of the script.

ZfDVer checks the agent registry entries to see what version of the ZfD agent is install on the PC

Reported is a custom registry entry that gets created when the script run to prevent repeat error reporting

IEver checks the version attribute on the iexplorer.exe to determine the version of Internet Explorer

#ce --------------------------------------------------------------------------------------------------------------------------------------------------------

Dim $ZfDver = RegRead ( "HKLM\SOFTWARE\Novell\ZENworks", "Version" )

Dim $Reported = RegRead ( "HKLM\SOFTWARE\Novell\Distro", "Reported" )

Dim $IEver = FileGetVersion("C:\Program Files\Internet Explorer\iexplore.exe")

#cs --------------------------------------------------------------------------------------------------------------------------------------------------------

ZfD Agent version checking, Internet Explorer version checking, and OS version [service pack level] checking.

The ZfD agent checking is absolute and not a minimum range to ensure all workstation the script touches will be updated.  There have been cases where a PC

has a previous version of the agent deployed to it for unknown reasons and the deployment through NAL did not work.  The section will detect those that Do

not have the version wanted on all PC's then tell you why it failed if an attempt to install was done through NAL.

The most common reasons for an installation failure are due to the Internet Explorer version not being the minimum or the service pack level Not

being the minimum for the OS the agent is being installed on to.

#ce --------------------------------------------------------------------------------------------------------------------------------------------------------

If $ZfDver = "" Then


ElseIf $IEver < "" Then



    If @OSVersion = "WIN_XP" Then

        If @OSServicePack = "Service Pack 1" Then


        ElseIf @OSServicePack = "Service Pack 2" Then





    ElseIf @OSVersion = "WIN_2000" Then

        If @OSServicePack = "Service Pack 4" Then





    ElseIf @OSVersion = "WIN_98" Then

        If @OSServicePack = "A" Then









#cs --------------------------------------------------------------------------------------------------------------------------------------------------------

Error reporting function

When an error is detected, this function is called to report the type of error being reported to a syslog server.  This script was written to use the Kiwi

Syslog Daemon server (http://www.kiwisyslog.com/syslog-info.php).  Other types of Syslog server can be used, but you may need to modify the command line

being used to communicate with other Syslog server.  The client software being used is a Kiwi Logger (http://www.kiwisyslog.com/logger-info.php).  You will

want to install this logger tool then find the executable klogwin.exe.

For reporting to function properly. Install the Syslog server onto a Windows machine (workstation or server) with a static IP address.  Edit the IPADDRESS In

this script to match the IP address of your Syslog server.  Then place the klogwin.exe into a public network folder that all user have mapped as a search drive

and have read/filescan rights to.  The script it's self should also be placed into a public search drive for execution.

#ce --------------------------------------------------------------------------------------------------------------------------------------------------------

Func ReportError($error)

    If $Reported = "1" Then


    ElseIf $error = "SP" Then

        Run ( "klogwin.exe -h IPADDRESS -m " & '"' & @ComputerName & " is " & @OSVersion & " " @OSServicePack & " needs current service pack installed for ZfD deployment" & '"' )

        RegWrite ( "HKLM\SOFTWARE\Novell\Distro", "Reported", "REG_SZ", "1" )

    ElseIf $error = "OS" Then

        Run ( "klogwin.exe -h IPADDRESS -m " & '"' & @ComputerName & " uses " & @OSVersion & " " @OSServicePack & " which is an unsupported operating system" & '"' )

        RegWrite ( "HKLM\SOFTWARE\Novell\Distro", "Reported", "REG_SZ", "1" )

    ElseIf $error = "IE" Then

        Run ( "klogwin.exe -h IPADDRESS -m " & '"' & @ComputerName & " has Internet Explorer version " &  $IEver & " IE6 will need to be installed" & '"' )

        RegWrite ( "HKLM\SOFTWARE\Novell\Distro", "Reported", "REG_SZ", "1" )

    ElseIf $error = "AD" Then

        Run ( "klogwin.exe -h IPADDRESS -m " & '"' & @ComputerName & " Failed to Install ZfD Agent, unable to authenticate as administrator" & '"' )

        RegWrite ( "HKLM\SOFTWARE\Novell\Distro", "Reported", "REG_SZ", "1" )




#cs --------------------------------------------------------------------------------------------------------------------------------------------------------

Zenworks for Desktops Agent Deployment Function

This function will display a pop-up window on the users screen to tell them what is going on (highly recommended to do so, don't keep users in the dark and

perform a silent install.  Would be prone to user error if the turn their PC's off in the middle of an install).  

It will then copy the agent installer down to the local drive and place it into the users temp directory.  This is needed because the RunAs with in AutoIT  

and the Windows RunAs tool both fail to run a program from a network drive in a Non-Active Directory environment (currently untested by me in an AD environment)

the script pauses for a couple of seconds to allow the file to complete it's copy and for the hard drive to flush cash to disk (going to fast results in file

copy errors.

The script will then pass local administrator authentication to the system and all Run commands afterwards will use that authentication to execute.  When the

installer runs, it will produce an execution failure if the local admin rights not present and report an error to the Syslog server to let IT know what system

failed to run the installer.

If end users are administrators of their local PC's the authentication routine is not needed and can be remarked out of execution.

If end users are NOT administrators of their local PC's and there is no common administrator password, this script will not work for you.

#ce --------------------------------------------------------------------------------------------------------------------------------------------------------

Func InstallZfD()

    Opt( "RunErrorsFatal", 0 )

    SplashTextOn ( "Window Title", "Message to be displayed to the user", 450, 270, -1, 0, 0,"Tahoma Bold", 22, 800 )

    FileCopy ( "\\UNC\PATH\TO\ZfDAgent.msi", @TempDir, 1)

    Sleep (5000)

    RunAsSet ( "administrator", @ComputerName, "PASSWORD" )

    $result = RunWait ( "msiexec.exe /i " & @TempDir & "\ZfDAgent.msi /qb-! STARTUP_APPEXPLORER=1 STARTUP_APPWINDOW=0 ADDLOCAL=ALL LOGIN_PASSIVE_MODE=0 NAL_SINGLE_TREE=1 ZENWORKS_TREE=NAME", @UserProfileDir )

    If @error Then


        SplashTextOn ( "Window Title", "There was a failure in the installation of Zenworks on your PC, the help desk has been notified of this failure", 450, 270, -1, 0, 0,"Tahoma Bold", 22, 800 )

        Sleep (5000)



    SplashOff ()



Back to Novell: ZENworks FAQ Index
Back to Novell: ZENworks Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close