Installing ZENworks Agent through Microsoft Deployment Toolkit (MDT)

1 Likes
over 4 years ago

About Microsoft Deployment Toolkit


The Microsoft Deployment Toolkit (MDT) can help build an automated installation source for deploying Windows OS and Office. The build can also include device drivers, Windows updates, and any other software.

The ZENworks Agent is one such software that needs to be installed during deployment.

Now, let me explain the way the ZENworks agent installation is carried out in the problem statement.

About ZENworks Agent Installation



ZENworks Agent can be installed through an executable (PreAgentPkg_Agent[Complete|CompleteDotNet].exe) available on ZENworks Primary in the zone. This PreAgent package contains various individual packages that comprises the Agent. The ZENworks agent can be installed by running this PreAgent package with the following options. There are other command line parameters than listed below. Use the PreAgentPkg_Agent.exe -h option to list all the available options.


-x = suppress reboot (Manual Reboot)
-q = show no reboot prompt(quiet install)
-m = rebootless agent with limited agent




Executing PreAgent will extract the packages & create a pre agent service to track the agent installation. The PreAgent executable now exists leaving the service for tracking of individual packages required for the agent.

Problem Statement



The ZENworks PreAgent exists after the initial tasks and doesn't wait till the installation of the individual packages. The MDT deployment will move on to the next installation in the build, thinking that the installation of ZENworks Agent is finished. This can lead to installation failure as there can be only be one installation (one instance of msiexec) is allowed in Windows at a given time.

Solution



We wrap this installer in a PowerShell script, which will be running & tracking the agent installation until it finishes.

How To



The MDT build can now be configured to run this script instead of the PreAgent package. This script will make sure that we don't return the control to MDT while the agent installation is in progress & thus sequencing the next installations from the MDT build.

How the Script Works



This script will track the status file ZPA.status that gets created, updated with every activity of PreAgent, individual package installation and reboot behavior post installation. This is a more reliable way to track the agent installation.

The script is available ZENworks PreAgent Tracker in zip format. Please feel free to tune the script for different command options, configure script timeout, and more.

Hope this helps.

Labels:

How To-Best Practice
Comment List
Anonymous
  • Dear christoph3, had kind of the same Problem. There was a bug in 1803 release. I had to run Windows Updates in the Tasksequence bevor the zenworksagent Installation. Then reboot is fine. you can also patch your install.wim with the August updates and then you are also fine.
  • Good to know that this script helped you.

    As to why the login screen is missing, I suspect the problem could be with windows update. You may want to verify on a setup with updates applied & see if the problem persists.
  • Thank you very much, the only problem i run into is that after using this script somehow disables the login screen after successfully installing and then rebooting. i tried it with a unpatched windows 10 r1803 iso
  • Yes! Thank you!

    @Novell: Can you guys rewrite the agent installer to be a single MSI or exe that functions like a traditional installer that exits on error or waits until its finished doing all its work and then returns an error code? This would be awesome! Also, this logic has been used since early versions of ZENworks and now that ZENworks 2017 is out, I believe it is high time to address this. Organizations should not have to write process tracking scripts to get your agent deployed.
  • I initially found this problem & a solution being described @ www.vaughnemiller.com/.../

    However due to limitation with the solution posted in the about post, I have come up with a different approach for better reliability.
Related Discussions
Recommended