REM ******************************************************************************* ************************************************ REM Apple Quicktime Uninstaller. Created by Ed Middlebrooks. Modify variables below. REM REM PreRequisites: REM This document assumes you have a central file server with a software deployment folder, or other folder REM which can be used to place this script, the installation files, as well as collect logs. REM I downloaded the latest Quicktime 7 and extracted the .MSI files needed by running QuickTimeInstaller.exe /extract REM and placed the extracted .MSI files in the "InstallersPath" location. These files have been included for your convenience. REM The software deployment folder should have at least read permissions for Everyone. REM REM ******************************************************************************* ************************************************
REM Set LogLocation to a central directory to collect uninstall log files. set LogLocation=\\FILESERVERNAME.yourdomain.com\SoftwareDeployment\Quicktime\Uninst allLogs
REM Download the latest Quicktime. Extract the .MSI files needed by running QuickTimeInstaller.exe /extract and place the extracted .MSI files in this location: set InstallersPath=\\FILESERVERNAME.yourdomain.com\SoftwareDeployment\Quicktime
REM Set the Path to the Lansweeper LSPush.exe file to update the client after uninstall. set LSPushPath=\\FILESERVERNAME.yourdomain.com\softwaredeployment
REM Set the Lansweeper server LSPush.exe should send the scan results to. set LansweeperServer=LANSWEEPERSERVER.yourdomain.com
REM ********************************************************************* REM Uninstall code begins here. Do not modify anything below this line. REM *********************************************************************
:RegQuery reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\QuickTimePlayer.exe" if NOT %errorlevel%==1 (goto UninstallQuicktime) else (goto End)
REM If 0 returned, there was no error so the product was found. Run the uninstaller here. :UninstallQuicktime start wmic product where "name like 'quicktim%%'" call uninstall /nointeractive REM Sometimes wmic will hang, if no response from wmic after 10 minutes, kill it. ping -n 600 -w 1 127.0.0.1>nul taskkill /im WMIC.exe /f
REM Check if Quicktime was successfully uninstalled :RegQuery2 reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\QuickTimePlayer.exe" if NOT %errorlevel%==1 (goto UninstallQuicktime2) else (goto End)
REM If product could not be uninstalled by wmic, upgrade product to latest version to set the guid to {FF59BD75-466A-4D5A-AD23-AAD87C5FD44C}, then uninstall it. :UninstallQuicktime2 start /wait msiexec.exe /i %installerspath%\quicktime.msi /quiet DESKTOP_SHORTCUTS=NO start /wait msiexec.exe /i %installerspath%\applesoftwareupdate.msi /quiet start /wait msiexec.exe /i %installerspath%\appleapplicationsupport.msi /quiet start /wait msiexec.exe /x {FF59BD75-466A-4D5A-AD23-AAD87C5FD44C} /qn
REM If 1 or other was returned, the product was not found or another error occurred. Do nothing. :End reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\QuickTimePlayer.exe" echo %date% %time% Setup ended with error code %errorlevel%. 0=Quicktime Still Installed, 1=Quicktime Not Found >> %LogLocation%\%computername%.txt
REM Run Lansweeper Update. start %LSPushPath%\lspush.exe %LansweeperServer% |