Close Menu
    Facebook X (Twitter) Instagram
    Tuesday, May 20
    X (Twitter) LinkedIn
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»SCCM 2007»SCCM TS VB Script to Uninstall applications

    SCCM TS VB Script to Uninstall applications

    Eswar KonetiBy Eswar KonetiSeptember 02, 1:55 pm2 Mins Read SCCM 2007 6,880 Views
    Share
    Facebook Twitter LinkedIn Reddit

    Recently have a requirement to uninstall all old adobe versions and install the new on.Looking for something which can be done Via but i found the below method is simple that can remove all the older applications and instal the new one(which can be done Via TS by adding two TS actions one with removal of old adobe versions and other for installation of New adobe).

    Thought of sharing with you here how to remove different versions of applications at one go. Thanks to john Marcum for providing me the command line.

    Here is the simple script that checks if the application is in use or not ,if app is opened ,it will terminate and start the uninstallation .

    On Error Resume Next

     Dim WshShell

    Set objHOST = CreateObject("WScript.Shell")

     strComputer = "."

    Set objWMIService = GetObject("winmgmts:" _

        & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set colProcessList = objWMIService.ExecQuery _

        ("Select * from Win32_Process Where Name = 'acroRd32.exe'")

    For Each objProcess in colProcessList

        objProcess.Terminate()

        Exit For

    Next

     Set WshShell= CreateObject("Wscript.Shell")

    WshShell.Run "msiexec /x {AC76BA86-7AD7-1033-7B44-A94000000001} /qn /norestart",0,true

    WshShell.Run "msiexec /x {AC76BA86-7AD7-FFFF-7B44-AA0000000002} /qn /norestart",0,true

    WshShell.Run "msiexec /x {AC76BA86-7AD7-FFFF-7B45-AA0000000002} /qn /norestart",0,true

    If you have multiple versions with different product ID for removal,add all the product ID's at the end of the above code you know what i mean.

    remove applications SCCM Scripts Task Sequence Task Sequence to remove Application using VB Script VBscript uninstall appliations
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    Optimize Your Intune Workflow with a Powerful Browser Extension

    March 22, 10:39 am

    Migrate Microsoft 365 Updates from SCCM/MECM to Intune for Co-Managed Devices

    February 11, 9:50 pm

    Investigating Co-Management Issues with Windows Endpoints in SCCM/Intune

    October 26, 10:45 pm

    1 Comment

    1. Pingback: My own SCCM Collection | SCCM TS VB Script to Uninstall applications

    Leave a ReplyCancel reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2024 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.