I have a program that calls the dism.exe program and it runs a few commands in the background. Right now, I only check for a return code of 0 or anything else in order to show a process failed or succeeded. What could i cross examine the return code with in order to get an accurate return error. Which returns are the DISM referenced to?
The link provided in the comment DISMAPI Error Messages provides a very few error code, but in my experience, these are not the most common error codes returned by DISM.exe
.
In my scenarios, I mostly use dism.exe /Online ...
and here's what I found so far:
ERROR_SUCCESS_REBOOT_REQUIRED ~ 3010 (0xBC2)
when /Add-Package
requires a reboot.ERROR_BAD_FORMAT ~ 11 (0xB)
when you hand /Add-Package
a package that is not applicable to this operating system (e.g. an x86 package for a x64 Windows)ERROR_PATH_NOT_FOUND ~ 3
when the file you hand to /PackagePath
doesn't existERROR_ELEVATION_REQUIRED ~ 740 (0x2E4)
when you're not running as admin.Additional Links:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With