How to solve the error when you run advanceagent.msi manually on a PC/Server? Error "Could not open SCManager, error 5"

Version 1

    Verified Product Versions

    Endpoint Manager 9.6Endpoint Manager 2016.xEndpoint Manager 2017.x

    Symptoms:

    When you run the advanceagent.msi manually by double click the installer on a PC/Server, the Advance Agent Setup ended prematurely because of an error.

    On the agent, in the log C:\WINDOWS\TEMP\AdvanceAgent.log, you may find below errors:

    Thu, 22 Mar 2018 15:53:13 2716 14212 Could not open the service LANDesk Advance Agent. Error 1060 
    Thu, 22 Mar 2018 15:53:13 2716 14212 Failed to unregister service can't open service handle 
    Thu, 22 Mar 2018 16:03:27 7584 17088 Starting register 
    Thu, 22 Mar 2018 16:03:27 7584 17088 Starting Stop 
    Thu, 22 Mar 2018 16:03:27 7584 17088 Could not open SCManager, error 5 
    Thu, 22 Mar 2018 16:03:27 7584 17088 Unable to open service handle, assuming service is not installed 
    Thu, 22 Mar 2018 16:03:27 7584 17088 Could not open SCM, cannot register service (error 5) 
    Thu, 22 Mar 2018 16:03:38 5888 6040 Could not open SCManager, error 5 
    Thu, 22 Mar 2018 16:03:38 5888 6040 Service is not registered, cannot start
    
    

     

    Cause:

    When you run a .msi manually, you do not run with administrator rights. When right click on a .msi file, you do not have the option to run it as the adminstrator.

     

    Resolution:

    Open cmd as administrator, run command looks like below:

    msiexec /i C:\advanceagent.msi

    Bonus tip: You may add parameter to the cmd to generate log such as:

    msiexec /i C:\advanceagent.msi /LIME logfile.txt

     

    Reference:

    Why Can't I install the Advance Agent over itself on a client?

    Advance Agent install process and troubleshooting tips

    How to Create and Deploy an Advance Agent