-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Desktops
- Desktop Software and How To Questions
- HP Image Assistant 5.3.1 Always returns 257 even when instal...

Create an account on the HP Community to personalize your profile and ask a question
03-03-2025 05:59 PM
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.
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>"
03-07-2025 10:58 AM
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)" } }
If my response helped, please mark it as an Accepted Solution! ✅ It helps others and spreads support. Also, tapping "Yes" on "Was this reply helpful?" makes a big difference! Thanks!
03-07-2025 10:58 AM
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
If my response helped, please mark it as an Accepted Solution! ✅ It helps others and spreads support. Also, tapping "Yes" on "Was this reply helpful?" makes a big difference! Thanks!