HP Device Manager 4.6 - Command Task (WES) Troubleshooting Guide

Overview
The purpose of this document is to demonstrate how to troubleshoot issues that might occur while using the Command
Task of HP Device Manager (HPDM) on Windows Embedded Standard (WES) thin clients.
Troubleshooting steps
Validity of the command line
Sometimes the HPDM Command Task returns error code 14004022. Use the following steps to check the validity of your
command.
Check that the command is correct. Execute the command line manually first.
Check that cmd.exe /c is added to the beginning of cmd.exe build-in commands. For example: cmd.exe /c “dir”.
Check that the files needed to execute the command exist on the target thin client.
Check that the return code of the command is 0. Create a batch script that contains the command line and add the tag
(echo %ERRORLEVEL%) in the last line. Run the batch script to see the return code of the command.
Keep in mind that the working directory of the command executed by the HPDM Agent is c:\windows\system32. To
change it, create a batch script. In the script, add cd <specified path> to the beginning and write all the command lines
with the full path. Then, use HPDM to execute the script.
Keep in mind that the execution user account for the HPDM Agent is “SYSTEM”, and that when you use the command at
the cmd console or double-click a program to run it, the logged-on user account runs the command. Some commands
that need an administrator account will not work using the HPDM Agent, such as the following example with the Microsoft
Software Installer (MSI).
MSI Installation by a Command task
You can install the MSI using the File and Registry subtasks, Deploy Files and Command, in HPDM. This guide assumes you
know how to use the Deploy Files task. If the MSI will not install correctly, it might be because of two common errors.
The first error is that the command line returns error code 14004022. The second is that the task appears to execute
successfully, but the MSI does not install on the target thin client. This section demonstrates how to resolve these issues.
Command line error when installing MSI
If the command line returns the error code 14004022, use the following methods to troubleshoot.
Make sure that you input the correct command and add /quiet if it is supported option. For example, msiexec.exe /i
c:\XXX.msi /quiet.
Make sure that /norestart is specified in the command line if it is supported. Otherwise, the HPDM Agent will not be able
to return the execution result, and instead will get and execute the task again after the next reboot.
Make sure that the MSI can be installed successfully without HPDM.
On a test thin client, manually copy the MSI file to the directory that you would use in the Deploy Files task.
Check whether the MSI file installed successfully using the command line that you used in the Command task.
Check the return code of the msiexe.exe command. The install command misexe.exe does not always return 0 after an
installation, even if it successfully installs the program. If the system needs to reboot after the installation, the command
msiexec.exe returns the error code 3010 (ERROR_SUCCESS_REBOOT_REQUIRED). This error means that the requested
operation was successful, but the changes will not be effective until the system is rebooted. Although the task displays a
failure in the HPDM Console, the MSI file installed successfully. To prevent this error, do the following steps.
Write a batch script as follows:
msiexec.exe /i Directory\xxx.msi /quiet /norestart (For an MSI file, please use the full path.)
if %ERRORLEVEL% equ 3010 ( exit 0 ) else ( exit %ERRORLEVEL% )
Add the batch script file to the Deploy Files task for the MSI files.
Use the command line to run the script. The command is the full path of the script file on the thin client. For example,
z:\temp\Install_XXX_MSI.cmd.
Send the task to the target thin client to execute.
If msiexe.exe returns another acceptable error code, use echo %ERRORLEVEL% as shown previously to get the error code,
and then change the script as follows:
msiexec.exe /i Directory\xxx.msi /quiet /norestart
if %ERRORLEVEL% equ ErrorCode ( exit 0 ) else ( exit %ERRORLEVEL% )
2