locked
SCCM 2007 client unistallation and monitoring the unistallation using batch file RRS feed

  • Question

  • Dear Experts,

    We have create a batch file uninstalling the SCCM 2007 client, find below and confirm if this is fine.

    @echo off
    Echo Please Wait. Currently Uninstalling Microsoft SCCM 2007 Client
    IF EXIST C:\Windows\ccmsetup\ccmsetup.exe GOTO REMOVE
    GOTO END
    :REMOVE
    c:\Windows\ccmsetup\ccmsetup.exe /uninstall
    RD /S /Q C:\Windows\ccmsetup
    :END

    Our challege is to confirm whether the SCCM 2007 client is uninstalled without User intervention and ofcourse we dont have reporting tool's in place. Please throw some lights on how can confirm at one go.

    Regards,

    Ranjith

    • Moved by Eric MattoonMicrosoft employee Sunday, December 16, 2012 4:17 PM Uninstall Q's belong on Setup/Deployment forum (From:Configuration Manager 2007 Software Distribution)
    Wednesday, December 12, 2012 9:35 AM

Answers

  • Typo Error..It is PSEXEC.EXE which is part of PSTools http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

    Create Batch file with ccmsetup.exe /uninstall and run this batch file on multiple computers using PSEXEC.EXE.

    Command to use something like this: 

    psexec @computers.txt -c G:\script\uninstall.bat


    Please click on "vote as Helpful" if you feel this post helpful to you.

    Eswar Koneti | My Tech blog: www.eskonr.com | Linkedin: Eswar Koneti

    • Marked as answer by Yog Li Wednesday, December 19, 2012 11:15 AM
    Thursday, December 13, 2012 2:31 PM

All replies

  • Are you deploying the batch file from Configmgr? You won't be able to know 100% if it worked or not but you should get back an failed status state from the advertisement.


    John Marcum | http://myitforum.com/cs2/blogs/jmarcum/|

    Wednesday, December 12, 2012 1:34 PM
  • Hello,

    ccmsetup.exe is located in %windir%\system32\ccmsetup.
    To process uninstall silently execute : ccmsetup.exe /uninstall

    More informations on the technet : http://technet.microsoft.com/en-us/library/bb694276.aspx

    You batch can be more simple with no GOTO :

    IF EXIST C:\Windows\system32\ccmsetup\ccmsetup.exe ccmsetup.exe /uninstall

    If I were you, I would not delete the folder to keep the uninstall logs... As client is uninstalled there is no way to have the installation status in SCCM if you use Software Distribution to execute the script.



    Regards,
    Alexandre


    Wednesday, December 12, 2012 1:38 PM
  • Hi Alexandre,

    Thanks for the reply

    The batch file will be deployed via group policy not through SCCM console. if this is the case is their any possibility view the status of sccm client uninstallation?

    kindly provide your valuable inputs.

    Regards,

    Ranjith.U

    Thursday, December 13, 2012 5:33 AM
  • Using Group Policy ,you can be only know about if the Policy is deployed to the client machine using RSOP but whether it is successfully executed or not ,you will not be knowing.

    But If you use PXEXEC to remove the client on target machines,you can customise something like if Exit Code 0,Installation succeded else Failed with Error Code.


    Please click on "vote as Helpful" if you feel this post helpful to you.

    Eswar Koneti | My Tech blog: www.eskonr.com | Linkedin: Eswar Koneti

    Thursday, December 13, 2012 6:08 AM
  • there is c:\windows\system32 or c:\windows\syswow64 location for ccmsetup

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    @echo off
    Echo Please Wait. Currently Uninstalling Microsoft SCCM 2007 Client
    IF EXIST C:\Windows\System32\ccmsetup\ccmsetup.exe GOTO REMOVE
    GOTO END
    :REMOVE
    c:\Windows\System32\ccmsetup\ccmsetup.exe /uninstall
    RD /S /Q C:\Windows\System32\ccmsetup
    :END

    there is no specific way to check this but you can check this by creating a query .

    to see how many computers dont have client installed ,this query will show u all non client systems then u can count the no of computers u targeted and no of computers u uninstalled client.

    select Name, SMSAssignedSites, IPAddresses, IPSubnets, OperatingSystemNameandVersion, ResourceDomainORWorkgroup, LastLogonUserDomain, LastLogonUserName, SMSUniqueIdentifier, ResourceId, ResourceType, NetbiosName from sms_r_system where Client = 0 or Client is null

    Thursday, December 13, 2012 6:23 AM
  • Hi Eswar,

    Thanks for your valuable points.

    Could please explain me little more in PXEXEC, is that a tool or you are speaking about the PXE feature in SCCM.

    Regards,

    Ranjiht.U

    Thursday, December 13, 2012 6:31 AM
  • PsExec is a utility conied as a command line based remote administration tool and allows for the remote execution of processes on other systems. It uses the windows service control manager API to start the PsExecsvc on the remote system which creates a named pipe that PsExec communicates with.

    You can get it on your system by downloading the PsTools Suite from this link: http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx

    Once you have the PsExec on your system, open command prompt and browse to the location where you have saved the PsExec utility. After this simply type psexec.exe \\machine-name cmd.exe and if machine is online this command will take u to cmd of the client machine coz psexec.exe connects to system32 of client machine.

    Now browse to the client location on the remote system and then run ccmsetup.exe /uninstall to remotely uninstall SCCM client using PsExec.

    BR
    Rupinder

    • Proposed as answer by nabin777 Thursday, December 13, 2012 6:55 AM
    • Unproposed as answer by nabin777 Thursday, December 13, 2012 12:09 PM
    Thursday, December 13, 2012 6:52 AM
  • Typo Error..It is PSEXEC.EXE which is part of PSTools http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

    Create Batch file with ccmsetup.exe /uninstall and run this batch file on multiple computers using PSEXEC.EXE.

    Command to use something like this: 

    psexec @computers.txt -c G:\script\uninstall.bat


    Please click on "vote as Helpful" if you feel this post helpful to you.

    Eswar Koneti | My Tech blog: www.eskonr.com | Linkedin: Eswar Koneti

    • Marked as answer by Yog Li Wednesday, December 19, 2012 11:15 AM
    Thursday, December 13, 2012 2:31 PM