Set MsiName=PKGID-VENDOR-APPLICATION_NAME-VERSION-1.0.msi Set UPN=PKGID-VENDOR-APPLICATION_NAME-VERSION-1.0 Set LogsFolder="C:\SWDLogs\%UPN%_Install.log" if not exist "C:\SWDLogs" md "C:\SWDLogs" msiexec.exe /x {A5D4DE6F-62F0-46B8-82AF-174FFC021157} /qb-! /l*v %LogFolder% set uninsterror=%errorlevel% if %uninsterror%==0 goto :Misc if %uninsterror%==1641 goto :Misc if %uninsterror%==3010 goto :Misc goto :ERROR :Misc @echo Successfully Uninstalled APPLICATION_NAME goto :Einde :ERROR @echo Error Code is %uninsterror%if exist %LogFile% type %LogFile% goto :Einde :Einde @echo Job ended at %date% %Time% Exit %uninsterror%