Search code examples
cmdinstallshieldsccmwindows-installer

My installer package throws 3010 or 1641 when run from SCCM. Works fine if i run as admin


I have a installaer package (mySoftware.exe) which is working fine without any issue when i run manually as admin. But i am getting exit code 3010,1641 when i install the package via SCCM. My code skips the next steps if it gets other than "0" exit code. Right now, my installer consider "0" as Success. Non-Zero are error codes.

Do i need to modify installer script to consider "0","3010","3011","1641","1604" as Success exit code ? Do we need to change anything at SCCM end?

Do i need to consider to add any other exit code as Success? Do we have any other workaround for this issue.

mySoftware.exe /s /v" /quiet ADDLOCAL="mySoftwareConfig" /L*v "%mySoftwareLogFile%" /clone_wait

> My installer script has the following actions: 
  1)First uninstall existing package on the system.
> 2. Install the new package.  (Exit code 3010,1641 returns during installing the new package)
> 3. Configure the package.

Solution

  • Reboot: Those are generally just standard reboot message and you should handle them in your batch file as you suggest yourself.

    This is just a mock-up sample (I am no expert at this anymore):

    msiexec.exe /I Setup.msi ALLUSERS=1 /L*V %MSILOG% /qb-! ADDLOCAL=ALL
    if %errorlevel% == 3010 goto REBOOT
    
    <..stuff here..>
    
    :REBOOT
    echo MSIEXEC returned exit code 3010 which means that a reboot is required to complete installation >> %LOGFILE%
    

    Some info on errorlevel:


    MSI Error Messages: https://learn.microsoft.com/en-us/windows/win32/msi/error-codes

    • 0 - ERROR_SUCCESS - The action completed successfully.
    • 1604 - ERROR_INSTALL_SUSPEND - Installation suspended, incomplete.
    • 1641 - ERROR_SUCCESS_REBOOT_INITIATED - The installer has initiated a restart. This message is indicative of a success.
    • 3010 - ERROR_SUCCESS_REBOOT_REQUIRED - A restart is required to complete the install. This message is indicative of a success. This does not include installs where the ForceReboot action is run.

    And from other sources:

    • 3011 (0xBC3) - ERROR_SUCCESS_RESTART_REQUIRED - The requested operation is successful. Changes will not be effective until the service is restarted.