Issue

ZENworks policies can cause problems when deploying an ENGL build to a machine.

When reviewing the deployment process log file (ztoolkit.log) it is possible to see that a policy is being downloaded and applied. However it is not possible to tell which particular policy is being downloaded, applied and how this policy will affect the deployment process.

for example:

[06-Mar-12 11:06:03] [ZapphookZcm] [Debug] ActionSet processing BEGIN
[06-Mar-12 11:06:03] [ZapphookZcm] [Debug]    Current Task: PolicyManager
[06-Mar-12 11:06:03] [ZapphookZcm] [Debug]    Current Task Status: Downloading
[06-Mar-12 11:06:12] [ZapphookZcm] [Debug] ActionSet processing END


Solution

Update the phase vbs scripts to use the zac pl command to list the current policies to the ztoolkit.log file.

 Once the policies have been identified, edit the policy Requirements to ensure the policy does not apply during the build process.


Procedures


Done Task
 
1. Update project
 
2. Deploy new build process image
 
3. Test updated files
 
4. Review deployment process log file
 
5. Update project requirements
 
6. Redeploy project to machine
 
7. Review deployment process log file


  1. Update project


    • Launch Build Console.

    • Open project file.

    • Select Expert view -> Customisation -> Custom Files.

    • Update the following phase scripts:

      • phase2-after.vbs

      • phase3-before.vbs

      • phase3-after.vbs

    •  With the lines:

        utils.appendlog "*** Checking active ZENworks policies ***"
        utils.run "%comspec% /c zac pl >> c:\ztoolkit\ztoolkit.log",0,true
        utils.appendlog "*** Policy check completed ***"
      
      
    • Select Expert View -> Customisation -> Post-build.

    • Select Copy Log File.

    • Set Enabled to True.

    • Set Target Path to C:\%computername%.log.

      NOTE: When setting a Target Path, a UNC path or mapped drive can be used. Ensure that the location specified is accessible during the deployment process and includes the name of the file.
    • Save changes to project
  2. Deploy new build process image


    • Select Tools ->Deployment Wizard then click Next.

    • Select Build process Creation from the list of deployment tasks then click Next.

    • Select Build process (ztoolkit.zmg) from the Image Selection options. Deselect the other options then click Next.

    • click Next.

    • click Yes if prompted to continue.

    • click OK to dialog reporting The deployment has been created successfully.

    • Once the Deployment Wizard has completed, check the Open project folder option and Click Finish.

    • From the project folder, open the images folder and copy/update the <project directory>/ztoolkit.zmg file to the /images/<project directory> folder on the server.

  3. Test updated files


    • PXE Boot a machine to the ZENworks imaging Environment.

    • Select and restore the project.

    • The ENGL deployment process will run as before.

  4. Review deployment process log file


    • Open the deployment process log file.

       This will be c:\%computername%.log where %computername% has been replaced with the machine's computername.

    • There will still be entries for the ZENworks policy manager in the log file:

      [06-Mar-12 11:06:03] [ZapphookZcm] [Debug] ActionSet processing BEGIN
      [06-Mar-12 11:06:03] [ZapphookZcm] [Debug]    Current Task: PolicyManager
      [06-Mar-12 11:06:03] [ZapphookZcm] [Debug]    Current Task Status: Downloading
      [06-Mar-12 11:06:12] [ZapphookZcm] [Debug] ActionSet processing END
    • However there will also be information about what policies are active on the machine:

      [06-Mar-12 11:07:52] [Zmainrun-Phase2] Running custom scripts (post-phase)...
      [06-Mar-12 11:07:52] [Zmainrun-Phase2]   Processing 'phase2-after.vbs'...
      [06-Mar-12 11:07:52] [Zmainrun-Phase2] [Debug] Running [wscript C:\ztoolkit\phase2-after.vbs]
      [06-Mar-12 11:07:52] [ZtoolkitCtrl] ENGL ZtoolkitCtrl 7.0.0.0 (x86)
      [06-Mar-12 11:07:52] [ZtoolkitCtrl] Copyright (C) 1999-2012 Expert Networking Group Limited
      [06-Mar-12 11:07:52] [ZtoolkitCtrl] Licensed to: ENGL System Test
      [06-Mar-12 11:07:52] [ZtoolkitCtrl] *** Checking active ZENworks policies ***
      
         Processing Command:  pl
      
         Policy Name                                    Version   Assigned
         --------------------------------------------------------------------------
         dlu - engllab                                     3       Device
         Remote Management policy                          1       Device
         ZENworks Explorer Configuration Policy            2       Device
         Workstation Group Policy                          7       Device
         --------------------------------------------------------------------------
         Total Polices Assigned: 4
      [06-Mar-12 11:07:53] [ZtoolkitCtrl] *** Policy check completed ***
      [06-Mar-12 11:07:53] [Zmainrun-Phase2] [Debug]   returned 0 (exit code: 0)
  5. Update project requirements


    • Open the relevant policy in the ZENworks Control Centre.

    • Select the Requirements tab and click Add Filter.

    • Select Registry Key Exists from the drop down list.

    • Enter \HKEY_LOCAL_MACHINE\Software\ENGL\Ztoolkit into the first option box.

    • Select No in the second option box.

    • Click Apply.

  6. Redeploy project to machine


    • PXE Boot a machine to the ZENworks imaging Environment.

    • Select and restore the project.

    • The ENGL deployment process will run as before.

  7. Review deployment process log file


    • Open the deployment process log file.

       This will be c:\%computername%.log where %computername% has been replaced with the machine's computername.

    • There should no longer be entries for the ZENworks policy manager in the log file.

    • The policy checks will still occur but should not report any active policies on the machine:

      [06-Mar-12 12:07:52] [Zmainrun-Phase2] Running custom scripts (post-phase)...
      [06-Mar-12 12:07:52] [Zmainrun-Phase2]   Processing 'phase2-after.vbs'...
      [06-Mar-12 12:07:52] [Zmainrun-Phase2] [Debug] Running [wscript C:\ztoolkit\phase2-after.vbs]
      [06-Mar-12 12:07:52] [ZtoolkitCtrl] ENGL ZtoolkitCtrl 7.0.0.0 (x86)
      [06-Mar-12 12:07:52] [ZtoolkitCtrl] Copyright (C) 1999-2012 Expert Networking Group Limited
      [06-Mar-12 12:07:52] [ZtoolkitCtrl] Licensed to: ENGL System Test
      [06-Mar-12 12:07:52] [ZtoolkitCtrl] *** Checking active ZENworks policies ***
      
         Processing Command:  pl
      
         No Policies Assigned.
      
      [06-Mar-12 12:07:53] [ZtoolkitCtrl] *** Policy check completed ***
      [06-Mar-12 12:07:53] [Zmainrun-Phase2] [Debug]   returned 0 (exit code: 0)
    • Any issues with the deployment process due to policies should now be resolved.