• ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
Are you having HotKey issues? Click here for tips and tricks.
HP Recommended
t520
Microsoft Windows 10 (64-bit)

Hi,

 

We are trying to push an update to Windows 10 IoT thin clients to resolve a memory leak in the UWF.

We could reimage the entire fleet, but given some small tweaks on a user by user basis for things such as handedness (lefty or righty), this is less than desirable.

 

I am trying to create a task sequence to deploy and install the update automatically. I have the sequence to the point where it runs a script to run the .msu installer, but the task now fails with error 14004022.

 

I think this is because the agent doesn't return a successful result of the script, which contains this command:

c:\kb3205436.msu /quiet /norestart

 

I have put the /norestart as suggested in the HPDM documentation, as otherwise the machine will reboot and not return a script result. I know the update has finished installing, as if I reboot the device, it finishes configuring the update.

 

I need to know how to get the command to return a successful result to the HPDM agent, so that the next task in the sequence can trigger and run.


Thanks

James

1 ACCEPTED SOLUTION

Accepted Solutions
HP Recommended

You're right, by default HPDM returns "successful" only when the return code is 0.

 

Use the script below to let DM task accept the customized return code:

 

Install.exe

IF %ERRORLEVEL% EQU <customized success return code> GOTO END

If %ERRORLEVEL% EQU 0 GOTO END

:END

 

Check the white paper - Troubleshooting_Guide_CommandLine_Task_WES for more details. You can access the paper by clicking the help menu on HPDM Console.

I am an HPI Employee.
My opinions are my own, and do not express those of HPI.
**Click the White Thumbs Up Button on the right to say Thanks**

View solution in original post

5 REPLIES 5
HP Recommended

You're right, by default HPDM returns "successful" only when the return code is 0.

 

Use the script below to let DM task accept the customized return code:

 

Install.exe

IF %ERRORLEVEL% EQU <customized success return code> GOTO END

If %ERRORLEVEL% EQU 0 GOTO END

:END

 

Check the white paper - Troubleshooting_Guide_CommandLine_Task_WES for more details. You can access the paper by clicking the help menu on HPDM Console.

I am an HPI Employee.
My opinions are my own, and do not express those of HPI.
**Click the White Thumbs Up Button on the right to say Thanks**
HP Recommended

Hi Chen,

 

How do we know what the customised error code is going to be?

 

Given that our script contains only a single command, which is this:

c:\kb3205436.msu /quiet /norestart

 

We do not specify our own return code, as we are expecting this command to complete and return a normal return code of 0.

 

Do we need to run the script and output the error code to a text file to determine what results the script completes with?

 

Many thanks

James

HP Recommended

It was mentioned in the white paper:

 

  • 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.

 

If that is MSI from microsoft, usually the return is 3130. You'd better double confirm it before finalziing your script.

I am an HPI Employee.
My opinions are my own, and do not express those of HPI.
**Click the White Thumbs Up Button on the right to say Thanks**
HP Recommended

I see.

 

I have recreated the script directly on the thin client as c:\test.bat

It contains 3 lines:

C:\kb3205346.msu /quiet /norestart

echo %ERRORLEVEL%

pause

 

Hopefully this will mean I can get the error code once the installer completes, and combine that with your original suggestion to get a successful return result when issuing the command via HPDM.

 

Cheers

James

HP Recommended

Success!

 

The return code of the msu, is 3010

 

I stuck that into your script snippet, and the entire sequence now runs without issue.

 

Many thanks!

James

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.