Using Remote Commands to remove software

BatchPatch Forums Home Forums BatchPatch Support Forum Using Remote Commands to remove software

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #8640
    Colleen Schmidt
    Participant

    I am trying to remove Configuration Manager from some of our servers, and we were hoping that BatchPatch could do that for us.

    It’s a simple enough command to run: C:Windowsccmsetupccmsetup.exe -uninstall

    I have added it under the Execute Remote process/command. When I executed it on a selected server, I receive: Remote Command (logged output): Exit Code: 0 (SUCCESS)

    Unfortunately, after I remotely reboot the server, I see that the software is still installed on the server.

    Can someone please let me know what I am missing? I would eventually like to be able to schedule this process so that we can remove the software from a number of systems. Thanks!

    #9697
    doug
    Moderator

    Colleen – The BatchPatch command you are executing is executing successfully. So, if it’s not doing what you want to do, then it’s not a BatchPatch issue but rather an issue with the command that you’re executing.

    I would suggest the following steps:

    1. Determine the uninstall command for the desired software.

    2. Run that command at the command line (*not* using BP) of a computer to test that it works.

    3. Verify that the command worked by checking to see if the software was successfully removed. If it wasn’t, go back to step 1 and repeat until you determine the appropriate command are able to get it working at the command line *without* BP.

    4. Once you have determined the proper command and have tested it and can get it to work at the command line *without* BP, then you can go ahead and run that command in BP.

    P.S. – You said that after you remotely reboot the server, the software is installed. You should also make sure that the software isn’t reinstalling on reboot due to a policy or script that is setup in your environment. Make sure the command has done what you want before you reboot the machine. If the software is gone and you reboot the machine and it comes back, then you’ll know that you have an automated process that is reinstalling it.

    #9698
    Colleen Schmidt
    Participant

    Thanks for the quick response. The switch was supposed to be “/uninstall” not “-uninstall.”

    A colleague had disabled the component to automatically reinstall the software and told me the command line to use. I guess the “-” vs “/” was just lost in the excitement to use the software to deploy this command remotely.

    Once I put in the proper character, it worked perfectly!

    Thanks again!

    #9699
    doug
    Moderator

    Excellent! Thanks for confirming.

    Take care,

    Doug

    #11144
    atesser
    Participant

    I’m going to revive this old request because I’ve encountered a problem related to this process that may prove useful to someone else searching the forum in the future.

    When I run this process against machines in my domain, everything goes well the first time. Exit code 0 and SCCM is removed. However, when I run this remote command against my non-domain systems, some are successful, but others some back with Exit Code: 3. Could you please tell me what Exit Code 3 signifies?

    See below for a minimally sanitized paste of the messages:

    Tue-11:50:37> Remote Command: Exit Code: 3

    Tue-11:50:34> Remote Command: Executing \computer1 -u computer1usr -p *password* C:Windowsccmsetupccmsetup.exe /uninstall

    Tue-11:50:33> Remote Command: Establishing connection…

    Tue-11:50:33> Remote Command 1: Queued…

    Considerations:

    – The credentials being used are a local administrator account on the systems.

    – When I run a “Get Windows Update configuration” on the systems they all report back correctly, so the account doesn’t seem to be the problem.

    Please let me know if I can provide further info. Thanks!

    #11145
    doug
    Moderator

    Considering that the syntax itself is working for most of your computers, then I think we can assume that the syntax is correct and that the error code being returned is being returned by Windows (the remote system). The Windows system error code 3 translates to:

    ERROR_PATH_NOT_FOUND
    3 (0x3)
    The system cannot find the path specified.

    Have you confirmed that the ccmsetup.exe exists on those machines and that it exists inside the specified folder?

    -Doug

    #11146
    atesser
    Participant

    Absolutely correct! Thank for the quick and accurate response Doug.

    #11147
    doug
    Moderator

    Excellent! Glad to help.

    -Doug

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.