Kaseya Community

Uninstall Software That Appears in Add/Remove Screen

  • Hi

    I am a little stuck as I want to be able to remove a particular software program that is installed on 100+ Windows XP workststations.

    The login and password for these machines are all the same but they are on different AD. 100 Sites

    Any help would be much appreciated!!

    Thanks

    Confused

    Legacy Forum Name: Uninstall Software That Appears in Add/Remove Screen,
    Legacy Posted By Username: jsandu@indexteam.com
  • This should not be difficult, once you have installed an agent, you can run the script with "system" rights. this user is admin on the computer.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: jbleicher
  • Look in this registry key for your uninstall strings:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall


    Depending on the installer, you can add a silent switch:

    http://unattended.sourceforge.net/installers.php

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: SMason
  • HI Everyone,

    I have looked in the registry and cannot find an uninstall string.

    What I did find was

    HKEY_LOCAL_MACHINE\SOFTWARE\SIMS\Dinner Money\1.40

    Can someone help me with the script commands to try and uninstall this software.

    thanks

    JasConfused

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: jsandu@indexteam.com
  • You're looking in the wrong place.

    Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

    and then search for something in the software name. I'm guessing 'Dinner' should be sufficient. This will give you the uninstall string.

    Andrew

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: andrew.doull@computer-care.com.au
  • Hi,

    heres a little script I wrote that will grab the 'silent' uninstall strings for known software (or anything that uses msiexec).

    it will give you an output in txt listing the uninstall string and the silent uninstall string:

    Adobe Shockwave Player 11.5 (11.5.1.601)
    Uninstall: "C:\WINDOWS\system32\Adobe\Shockwave 11\uninstaller.exe"
    Agere Systems AC'97 Modem
    Uninstall: agrsmdel
    Quiet Uninstall: agrsmdel -s
    Adobe Media Player (1.1)
    Uninstall: msiexec /qb /x {5C74694C-A687-E3EB-FF18-B018D4A76ECD}
    Quiet Uninstall: msiexec /x {5C74694C-A687-E3EB-FF18-B018D4A76ECD} /quiet /norestart


    const HKEY_LOCAL_MACHINE = &H80000002
    Set StdOut = WScript.StdOut

    strComputer = "."
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

    oReg.EnumKey HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", arrSubKeys

    For Each subkey In arrSubKeys
    oReg.GetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & subkey, "QuietUninstallString", strQuietUninstall
    oReg.GetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & subkey, "UninstallString", strUninstall
    oReg.GetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & subkey, "DisplayName", strName
    oReg.GetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & subkey, "DisplayVersion", strVersion
    if (strName <> "") Then
    if (strQuietUninstall <> "") Then
    elseif (instr(1,lcase(strUninstall), "msiexec",1)) Then ' Create a quiet uninstall for msiexec install kits
    strQuietUninstall = Replace (strUninstall," /i"," /x",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," /qn","",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," /qb+","",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," /qb","",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," /qr","",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," /qf","",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," /quiet","",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," /passive","",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," /norestart","",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," /promptrestart","",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," /forcerestart","",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," rebootprompt=""""","",1,1,1)
    strQuietUninstall = Replace (strQuietUninstall," "," ",1,50)
    strQuietUninstall = strQuietUninstall & " /quiet /norestart"
    elseif (instr(1,lcase(strUninstall), "spuninst.exe",1)) Then ' Create a quiet uninstall for spuninst.exe install kits
    strQuietUninstall = strUninstall & " /quiet /norestart"
    end if
    StdOut.Write strName
    if (strVersion <> "") Then stdOut.Write " (" & strVersion & ")"
    StdOut.WriteLine
    if (strUninstall <> "" ) Then stdOut.WriteLine " Uninstall: " & vbTab & vbTab & strUninstall
    if (strQuietUninstall <> "" ) Then stdOut.WriteLine " Quiet Uninstall: " & vbTab & strQuietUninstall
    End If
    Next


    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: sam.taylor
  • sam.taylor
    Hi,

    heres a little script I wrote that will grab the 'silent' uninstall strings for known software (or anything that uses msiexec).


    Thanks sam...very handy bit of code.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: XeviouS