There is no standard way to uninstall software.
There are several ways, and i have searched for different solutions, And still have some questions.
There is also a big difference in uninstalling an msi or non-msi.

For MSI's i have the most information finded (copied from other posts/sites)

Uninstall MSI based installations:


Allow Uninstall from ZAW
1.) Enabled the Uninstall action set.
2.) Set the options to "Allow Users to Uninstall"
3.) Increment Bundle version and then refresh agent on workstation.
4.) You should now be able to uninstall the bundle by right-clicking on the bundle icon in the ZAW.

Uninstall Bundle from another bundle
1.) This is usually used if you need to uninstall an old version of a bundle before installing the new version.
2.) First enable your uninstall actions from the bundle you wish to uninstall.
3.) Now, create our updated bundle.
4.) As your first Install action for the new bundle, choose the "Uninstall Bundle" action.
5.) Browse and select the bundle that you wish to uninstall.
6.) Finish creating your new bundle.


'Remove Adobe Reader
On Error Resume Next

'************************************************* *********************
const AppName = "Adobe Reader"
'************************************************* *********************

const HKEY_LOCAL_MACHINE = &H80000002

Set WshShell = WScript.CreateObject("WScript.Shell")

'First, find the GUID
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=imp ersonate}!\\"&_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninsta ll"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
InstalledAppName = ""
InstalledAppName = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName")

If InStr(InstalledAppName, AppName) > 0 then
RawGUID = ""
GUID = ""
RawGUID = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\UninstallString")
GUID = Mid(RawGUID, instr(RawGUID, "{"), 38)
If GUID<>"" then
' Found matching GUID, removing...
WshShell.Run "msiexec /x " & GUID & " /q"
Exit For
End If
End If


If i understand this script it will read a registry value "Displayname" from the uninstall rek key.
If it match the const AppName, then it will run the uninstallstring finded in the same regkey.

My question for MSI based uninstall = Do you still need the original msi on disk?, the regkey "InstallSource" shows the place where it was.
I'm always install msi's from network share, and don't want to leave the old instalation files there for so long time.
If i have a new version, i delete the old msi.
But sometimes i see that i can use msiexec /x app.msi to uninstall the app (but then i use the original msi file to start from! (don't want that).

Uninstall NON-MSI based installations:

All of this is not working for non-msi installations.
There the possible uninstallstrings are setup.exe /uninstall or %program files\app\uninstall.exe
But the uninstallstrings in the registry for non-msi based software is most of the time not complete or silently.

So is there a basic way to uninstall non-msi installations?, or do you have to check the uninstall options for each app specific each time, and create a uninstall action / modify the action to put in the right uninstall string for that specific app. (like %program files%\app\uninstall.exe -s)

Or is there also a vbscript for non-msi installs? that work better!

I hope i get some advice to make a document with the best possible solutions.