• ×
    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
Join the HP Community Solve‑a‑thon | Help Others & Share Your Solutions | Live on Zoom | 2:30 PM to 2:30 AM IST | Every Wednesday Click here to know more
Check out our WINDOWS 11 Support Center info about: OPTIMIZATION, KNOWN ISSUES, FAQs, VIDEOS AND MORE.
HP Recommended

I am currently using HP Image Assistant to do silent SoftPaq installs from a custom repository. I'm expecting a 3010 return code if one of SP installs require a reboot. In testing I can see that this is what is returned from an individual SP install, but HP image assistant finishes with saving the recommendations file and then returns a 257, which is not accurate, as a reboot is required.

image.png

I've tried many different command lines to see if I could fix the issues, but to no success. Here is essentially what I'm running: HPImageAssistant.exe /Operation:Analyze /Action:Install /Offlinemode:"<Path to Custom Repository Folder built using HPCMSL>" /NonInteractive /Silent /Debug /Category:All /Selection:All /LogFolder:"<Path to Log Dir>"

2 REPLIES 2
HP Recommended

@Ayudememe,

 

Welcome to HP Support Community.

 

Thank you for posting your query, I will be glad to help you.

 

The issue you're encountering with HP Image Assistant (HPIA) 5.3.1 always returning 257 instead of the expected 3010 when a reboot is required may be due to how HPIA processes and aggregates SoftPaq installation return codes.
 

HPIA Overwrites SoftPaq Return Codes:

  • HPIA does not directly relay the return codes of individual SoftPaqs but rather provides its own aggregated return code.
  • This means even if a SoftPaq installer returns 3010 (Reboot Required), HPIA itself might not propagate this correctly.

Return Code 257 Interpretation:

  • Return code 257 in HPIA typically means "SoftPaq installations completed successfully, but some updates may require a reboot."
  • It does not directly translate to 3010, but it suggests that a reboot is needed.

Silent Installation Behavior:

  • The /Silent and /NonInteractive flags might suppress the expected return code behavior.
  • Some SoftPaqs may return 3010 when run individually but not when installed through HPIA.

Solutions:

Parse the Recommendations File Instead

Since HPIA logs reboot requirements in its recommendations XML file, you can check that file for a pending reboot flag.

  • The XML file should be located in the LogFolder path you specified.
  • Look for RebootRequired="true" in the XML output.
  • You can script a parser to check this flag and handle reboots accordingly.

Use SoftPaq Installer Directly

If you need 3010 specifically for automation, consider:

  • Running HPIA with /Operation:Analyze to generate the recommended updates list.
  • Using HP Client Management Script Library (HPCMSL) to install updates individually.
  • This will ensure each SoftPaq returns its own exit code.

$SoftPaqs = Get-HPSoftpaqList -Action:Install -Category:All -Path "<Path to Custom Repository>" foreach ($SoftPaq in $SoftPaqs) {    Start-HPSoftpaqInstall -SoftpaqNumber $SoftPaq.Number    if ($LASTEXITCODE -eq 3010) {        Write-Host "Reboot required for SoftPaq $($SoftPaq.Number)"    } }

I'm an HP Employee.


If this reply helped resolve your issue, please select the Accept as Solution as it helps others in the community quickly find the answer they’re looking for.


And if you found this reply helpful, clicking Yes below is a great way to let us know we’re providing the support you need, as it encourages us to keep improving and sharing helpful guidance.

HP Recommended

Try Running Without /Silent to Debug

To verify if suppression is causing the issue:

  • Run the command without /Silent and check if the behavior changes.

Manually Trigger a Reboot If 257 is Returned

Since 257 implies that some updates may need a reboot, you can treat it as a reboot-required return code.

Example (PowerShell):


$HPIA_ExitCode = Start-Process -FilePath "HPImageAssistant.exe" -ArgumentList "/Operation:Analyze /Action:Install ..." -Wait -PassThru if ($HPIA_ExitCode.ExitCode -eq 257) {    Write-Host "Reboot required."    Restart-Computer -Force }


Note:

  • 257 means some updates require a reboot but does not translate directly to 3010.
  • Check the recommendations file for RebootRequired="true".
  • Run individual SoftPaqs via HPCMSL if you need their actual exit codes.
  • Consider handling 257 as a reboot-required scenario in automation scripts.


I hope this helps.

 

Take care and have a good day.

 

Please click “Accepted Solution” if you feel my post solved your issue, it will help others find the solution. Click the “Kudos/Thumbs Up" on the bottom right to say “Thanks” for helping!

 

Hawks_Eye

HP Support 

I'm an HP Employee.


If this reply helped resolve your issue, please select the Accept as Solution as it helps others in the community quickly find the answer they’re looking for.


And if you found this reply helpful, clicking Yes below is a great way to let us know we’re providing the support you need, as it encourages us to keep improving and sharing helpful guidance.

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