Cool Solutions

Deploying ZENworks Adaptive Agent by using Active Directory Group Policy Objects (GPO)



By:

December 30, 2008 12:36 pm

Reads: 11921

Comments:0

Score:0

This Cool Solution helps you to automate the deployment of ZENworks 10 Configuration Management Adaptive Agent to devices in an Active Directory domain using Group Policy Objects.

The information in this article is organized as follows:

  1. Introduction
  2. Creating An MSI Installer For Agent Deployment Package
  3. Sample MSI Installer
  4. Creating A Shared Network Folder
  5. Creating A GPO To Deploy Adaptive Agent
  6. Uninstall

Section III provides a sample MSI installer created by following steps in Section II

I. Introduction

If you are managing devices in an Active Directory® domain, you can use the Software Installation feature of Group Policy to deploy ZENworks Adaptive Agent. This article requires the Group Policy Management Console (GPMC). To download GPMC, see Group Policy Management Console with Service Pack 1.

Active Directory Group Policy Objects can be used to deliver applications to computers or users. The application is installed when the computer starts and is available to all users who log in to the computer.

Group Policy provides support to deploy Windows Installer packages (.MSI files), Transform Files (.MST files), and patch files (.MSP files). The ZENworks Adaptive Agent deployment packages are available as an executable application ( PreAgentPkg_Agent.exe for network install and PreAgentPkg_AgentComplete.exe for standalone install) as it contains multiple MSI files. Since Active Directory does not provide means to deploy .exe files, you should create an MSI installer for the existing agent deployment packages.

II. Creating An MSI Installer For Agent Deployment Package

You can either create an MSI packaged with PreAgentPkg_Agent.exe or create an MSI that executes the PreAgentPkg_Agent.exe located in a shared folder if you do not want to recreate the MSI when the deployment packages get updated.

You can download the agent packages from the page https://<ZENworks Primary Server IP>/zenworks-setup. Or you can obtain the packages from %ZENWORKS_HOME%\install\downloads\setup\_all folder in a Windows Primary Server and /opt/novell/zenworks/install/downloads/setup/_all folder in a Linux Primary Server. The packages under _all folder can be deployed to both 32 bit and 64 bit platforms. It would be safer to use these packages for deployment if you are not sure of the architecture of the target device.

The below steps assume you have downloaded the package PreAgentPkg_Agent.exe or PreAgentPkg_AgentComplete.exe and placed it in C:\packages folder.

  1. Create an MSI. In this scenario, you can use WIX, an Open Source project, to create the MSI.

    1. Download wix-2.0.5805.0-binaries.zip from http://sourceforge.net/project/showfiles.php?group_id=105970&package_id=114109&release_id=574429
    2. Extract the wix-2.0.5805.0-binaries.zip to a temporary location. Let us say C:\wix.
  2. Download the attached ZENAgentInstall_embedded.wxs (Attached in ZENWorksAgentInstall.zip) or ZENAgentInstall_external.wxs (Attached in ZENWorksAgentInstall.zip) and copy to C:\wix.

    The ZENAgentInstall_embedded.wxs file creates an installer embedding the agent package inside it.

    The ZENAgentInstall_external.wxs file creates an installer that installs the agent package placed in a shared folder location. If you choose to use ZENAgentInstall_embedded.wxs, then continue with Step 3.

    If you choose to use ZENAgentInstall_external.wxs, then skip to Step 4.

  3. (Conditional) If you chose to use ZENAgentInstall_embedded.wxs , do the following:
    1. Open ZENAgentInstall_embedded.wxs file in a Notepad and edit it to point to pre agent package to be installed. For this change the src attribute of File element appropriately.

      <File Id=”zenpreagent” LongName=”preagent.exe” Name=”PREAGENT.EXE” src=”C:\packages\PreAgentPkg_Agent.exe” DiskId=”1″/>

    2. At the command prompt, go to C:\Wix and run the following commands:
      • E:\Wix > candle.exe ZENAgentInstall_external.wxs
        This compiles the .wxs file and creates ZENAgentInstall_external.wixobj
      • E:\Wix > light.exe ZENAgentInstall_external.wixobj
        This generates the msi ZENAgentInstall_external.msi.
  4. (Conditional). If you choose to use ZENAgentInstall_external.wxs, do the following;
    1. Specify an UNC path for the src attribute. Administrators, authenticated users and domain users should have access to the shared location.

      <File Id=”zenpreagent” LongName=”preagent.exe” Name=”PREAGENT.EXE” src=”\\packages.novell.com\packages\PreAgentPkg_Agent.exe” DiskId=”1″/>

    2. At the command prompt, go to C:\Wix and run the following commands:
      • E:\Wix > candle.exe ZENAgentInstall_embedded.wxs
        This compiles the .wxs file and creates ZENAgentInstall_embedded.wixobj
      • E:\Wix > light.exe ZENAgentInstall_embedded.wixobj
        This generates the msi ZENAgentInstall_embedded.msi.

III. Sample MSI Installer

The attached ZENAgentInstall.msi (Attached in ZENWorksAgentInstall.zip) is an installer which installs the file preagent.exe located in the same folder as itself. Copy the ZENAgentInstall.msi and PreAgentPkg_AgentComplete.exe to the shared folder created using steps in Section II. Rename the PreAgentPkg_AgentComplete.exe package as preagent.exe. Follow the steps in Section IV to deploy the MSI file through GPO.

IV. Creating A Shared Network Folder

The created Windows Installer packages – ZENAgentInstall_external.msi or ZENAgentInstall_embedded.msi, have to be placed in a shared folder location for the computers to access it.

To create a shared folder:

  1. Log in to the Active Directory server computer as an administrator.
  2. Create a shared network folder and copy the Installer Package created in it.

    You can also place the agent packages in this location, if you have used ZENAgentInstall_external.wxs and have to refer to the agent package from a shared location. Ensure that the src attribute in ZENAgentInstall_external.wxs refers to this location.

  3. Set permissions on the shared network folder to give read access to the MSI package to administrators, authenticated users, domain users and computers.

V. Creating A GPO In The Active Directory To Deploy Adaptive Agent

  1. Open up Active directory Users and Computers snap-in. To do this, click Start, point to Administrative Tools, and then click Active Directory Users and Computers.
  2. From the desktop Start menu, click Settings > Control Panel > Administrative Tools > Active Directory Users and Computers.
  3. In the console tree, right click your domain (or the Organizational Unit if you have to send the package to a particular group of computers only), and then click Properties.
  4. Click the Group Policy tab, and then click New.
  5. Type a descriptive name for the new GPO and press ENTER.

    Click to view.

  6. Click Edit.
  7. In Computer Configuration, expand Software Settings.

    Click to view.

  8. Right-click Software Installation, point to New , then click Package.
  9. In the Open dialog box, type the full Universal Naming Convention (UNC) path of the shared installer package to be installed. For example, \\server name \share\file name.msi.

    Note: In the UNC path, specify the computer name instead of the IP address.
    Do not use the Browse button to access the location. Make sure that you use the UNC path to the shared installer package.

    Click to view.

  10. Click Open.
  11. Click Assigned, and then click OK.

    Click to view.

    The package is listed in the right pane of the Group Policy Object Editor window.

    Click to view.

  12. Close the Group Policy snap-in, click OK, and then quit the Active Directory Users and Computers snap-in.

    When the client computer starts, the managed software package is automatically installed.

    Note: A restart of the target computer is required for the group policy object to be applied. Also please make sure that the Security Center in the target computers is on.

VI. Uninstall

To uninstall the ZENAgentInstall.msi, run msiexec /x <ProductCode> at the command prompt, where <ProductCode> is the product code of the ZENAgentInstall.msi. This does not uninstall the ZENWorks Adaptive Agent from the device.

To uninstall the Adaptive Agent, remove it from the Control Panel.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Categories: Uncategorized

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS