How to suppress "Press any key" window if scripting preagentpkg_agentcomplete.exe install

  • 7002300
  • 06-Jan-2009
  • 27-Apr-2012

Environment

Novell ZENworks 10 Configuration Management with Support Pack 1 - 10.1

Situation

When trying to run preagentpkg_agentcomplete.exe via a script (outside of ZCM deployment task) a second window is displayed with "Press any key to continue" if the preagent fails for some reason.  How can this window be suppressed so that user action is not required?

Resolution

The following command line options can be added to preagentpkg_agentcomplete.exe to suppress the error window:

C:\WINDOWS>PreAgentPkg_Agent.exe -p "ZENPreAgent.exe= -g 63b480753e1b08d1d1f8e51578db6c22" -p "ZPA_Iface.exe= -i"

Adding this command line when running preagentpkg_agentcomplete.exe will suppress the user interaction and kill the window silently.

"-g 63b480753e1b08d1d1f8e51578db6c22" - You can add any dummy guid (just some numbers)for this option. But -g is required for suppressing the user interaction.

The result of running the command line will be logged into ZPA.status file in the same location from where the exe was run. This file would have a message with the error, for example:

"PRE_AGENT_INSTALL_ERR_AGENT_EXISTS" indicating that agent is already installed.