#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Mike Script Function: Uninstall McAfee Antivirus & Epo agent Ver 7 oct 2009 #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here ; Display Dialog box $value = MsgBox (262145, "Uninstall McAfee V0.85", "This software will uninstall McAfee Vscan + ePO agent!", 24, "") if $value = "1" then MsgBox (0, "Uninstall McAfee", "Uninstall will now begin", 10, "") if $value = "-1" then MsgBox (0, "Uninstall McAfee", "Uninstall abandoned due to timeout!", 240, "") if $value = "2" then MsgBox (0, "Uninstall McAfee", "You chose to cancle the uninstallation...", 240, "") if $value = "-1" then exit ; Timeout if $value = "2" then exit ; Cancled MsgBox (0, "Uninstall McAfee", "Please note Outlook WILL be terminated during process", 20, "") ; Create a nice progressbar so people can see how the uninstall is progressing ProgressOn("Uninstalling McAfee Virus Scan + ePO agent", "Progress..", "") ; We need to take Outlook offline - if we dont then one of the McAfee plugins will come ; with an error each time outlooks starts afterwards ProgressSet( 15, "Shutting down Outlook") Run("taskkill /F /IM outlook.exe") Run("taskkill /F /IM OUTLOOK.EXE") Sleep(15000) ; Now lets uninstall McAfee Virus Scan (ver 7 - 8.5) ProgressSet( 30, "Uninstalling McAfee Virus Scan") Run("msiexec /x {5DF3D1BB-894E-4DCD-8275-159AC9829B43} /qb-! REMOVE=ALL REBOOT=ReallySupress") ProgressSet( 32, "Still uninstalling McAfee Virus Scan") Run("msiexec /x {35C03C04-3F1F-42C2-A989-A757EE691F65} /qb-! REMOVE=ALL REBOOT=ReallySupress") ; 8.5 version ProgressSet( 33, "Still uninstalling McAfee Virus Scan") Run("msiexec /x {59224777-298D-4E9C-9AEB-4A91BDA01B27} /qb-! REMOVE=ALL REBOOT=ReallySupress") ; 7.1 version ProgressSet( 34, "Still uninstalling McAfee Virus Scan") Run("msiexec /x {1912F734-6580-4620-8AFD-ECCCEA19CDE2} /qb-! REMOVE=ALL REBOOT=ReallySupress") ; 7.0 version ProgressSet( 35, "Still uninstalling McAfee Virus Scan") ; delay (but with progress bar moving) 30 sec (just to ensure the uninstall process get running withour interruption) For $i = 40 to 70 step 1 sleep(1000) ProgressSet( $i, "Still uninstalling McAfee Virus Scan") Next ; Now let us uninstall the ePO agent ProgressSet( 75, "Uninstalling McAfee ePO agent (this may take some time)") if FileExists( @ProgramFilesDir & "\Network Associates\Common Framework\FrmInst.exe") then RunWait(@ProgramFilesDir & "\Network Associates\Common Framework\FrmInst.exe /forceuninstall /Silent") if FileExists( @ProgramFilesDir & "\McAfee\Common Framework\FrmInst.exe") then RunWait(@ProgramFilesDir & "\McAfee\Common Framework\FrmInst.exe /forceuninstall /Silent") sleep(3000) ; We retry the ePO remove with different switches (just in case the above failed) ProgressSet( 85, "Uninstalling McAfee ePO agent - attempt 2") if FileExists( @ProgramFilesDir & "\Network Associates\Common Framework\FrmInst.exe") then RunWait(@ProgramFilesDir & "\Network Associates\Common Framework\FrmInst.exe /SILENT /remove=agent") if FileExists( @ProgramFilesDir & "\McAfee\Common Framework\FrmInst.exe") then RunWait(@ProgramFilesDir & "\McAfee\Common Framework\FrmInst.exe /SILENT /remove=agent") ProgressSet(100 , "Done", "Complete") sleep(5000) ProgressOff() ; If any of these files are found the uninstall failed and a dialog box will be shown. if FileExists( @ProgramFilesDir & "\Network Associates\Common Framework\FrmInst.exe") then $value = "999" if FileExists( @ProgramFilesDir & "\McAfee\Common Framework\FrmInst.exe") then $value = "999" if FileExists( @ProgramFilesDir & "\Network Associates\VirusScan\Mcshield.exe") then $value = "999" if FileExists( @ProgramFilesDir & "\McAfee\VirusScan\Mcshield.exe") then $value = "999" if $value = "999" then MsgBox (0, "Uninstall McAfee", "Uninstall failed...", 0, "") Else MsgBox (0, "Uninstall McAfee", "Uninstall completed...", 20, "") MsgBox (0, "Uninstall McAfee", "Brought to you by www.KanManDet.Dk", 20, "")