Office CleanUp Tool [2003,2007,2010]

Discussion in 'Application Software' started by maorosh1, Jul 22, 2010.

  1. maorosh1

    maorosh1 MDL Novice

    Jun 21, 2010
    17
    14
    0
    #1 maorosh1, Jul 22, 2010
    Last edited by a moderator: Apr 20, 2017
    Batch file that i made
    that remove Office 2003 \ 2007 \ 2010
    work for 64/32 Bit Office system
    remove:
    Services
    Directories
    registry enteries
    Uninstall key's

    * Make sure run this batch file AS admin
    * make sure ur media IS not write protect


    Script is here :: pastebin DOT com /tjxa9yFm
    Code:
    @echo off&title Office 2003\7\10 Clean Up Tool!&cls&echo.&echo This tool will remove almost any office that&echo a u have on ur computer, LIke:&echo * Office 2003, Professional, (Standart ???)&echo * Office 2007, Enteprise, Ultimate, Professional&echo   Home-And-Student, Standart, Small business&echo * Office 2007 {MSDN}, Enteprise, Ultimate,&echo   Professional, Professional plus&echo * Office 2010, Enteprise, Ultimate, Professional&echo   Home-And-Student, Standart, Small business&echo * Office 2010 {MSDN}, Enteprise, Ultimate,&echo   Professional, Professional plus&echo.&echo Press any key 2 Continue!&pause >nul &cls
    
    echo.&echo Close And Remove Service's
    tskill /a GROOVEMN >nul 2>&1
    sc stop "Microsoft SharePoint WorkspaceAudit Service" >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Microsoft SharePoint WorkspaceAudit Service" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Microsoft SharePoint WorkspaceAudit Service" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Microsoft SharePoint WorkspaceAudit Service" /f >nul 2>&1
    sc stop "osppsvc" >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\osppsvc" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\osppsvc" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\osppsvc" /f >nul 2>&1
    sc stop "odserv" >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\odserv" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\odserv" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\odserv" /f >nul 2>&1
    sc stop "ose" >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ose" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ose" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ose" /f >nul 2>&1
    sc stop "Outlook" >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Outlook" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Outlook" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Outlook" /f >nul 2>&1
    
    echo Remove Direcotorie's
    rd/s/q "%HOMEDRIVE%\MSOCache" >nul 2>&1
    rd/s/q "%HOMEDRIVE%\Config.msi" >nul 2>&1
    
    rd/s/q "%programfiles%\Microsoft Office" >nul 2>&1
    rd/s/q "%programfiles%\Common Files\microsoft shared\OFFICE11" >nul 2>&1
    rd/s/q "%programfiles%\Common Files\microsoft shared\OFFICE12" >nul 2>&1
    rd/s/q "%programfiles%\Common Files\microsoft shared\OFFICE14" >nul 2>&1
    
    if defined programfiles(X86) (
    rd/s/q "%programfiles(x86)%\Microsoft Office" >nul 2>&1
    rd/s/q "%programfiles(x86)%\Common Files\microsoft shared\OFFICE11" >nul 2>&1
    rd/s/q "%programfiles(X86)%\Common Files\microsoft shared\OFFICE12" >nul 2>&1
    rd/s/q "%programfiles(X86)%\Common Files\microsoft shared\OFFICE14" >nul 2>&1
    )
    
    rd/s/q "%programfiles%\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform" >nul 2>&1
    rd/s/q "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >nul 2>&1
    rd/s/q "%ALLUSERSPROFILE%\Application Data\Microsoft\OFFICE" >nul 2>&1
    rd/s/q "%ALLUSERSPROFILE%\Microsoft\OFFICE" >nul 2>&1
    
    echo Remove Registry entirie's
    reg delete "HKEY_CURRENT_USER\Software\Microsoft\Office" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office" /f >nul 2>&1
    del /q "list" >nul 2>&1
    reg query "HKEY_CLASSES_ROOT\Installer\Products" | find "0002" >>"list"
    reg query "HKEY_CLASSES_ROOT\Installer\Products" | find "0004" >>"list"
    reg query "HKEY_CLASSES_ROOT\Installer\Features" | find "0002" >>"list"
    reg query "HKEY_CLASSES_ROOT\Installer\Features" | find "0004" >>"list"
    reg query "HKEY_CLASSES_ROOT\Installer\UpgradeCodes" | find "0002" >>"list"
    reg query "HKEY_CLASSES_ROOT\Installer\UpgradeCodes" | find "0004" >>"list"
    reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | find "{101" >>"list"
    reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | find "{111" >>"list"
    reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | find "{201" >>"list"
    reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | find "{211" >>"list"
    reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | find "{901" >>"list"
    reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | find "{911" >>"list"
    if exist "list" for /f %%i in (list) do reg delete "%%i" /f >nul 2>&1
    del /q "list" >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ENTERPRISE" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ULTIMATE" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PRO" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PROPLUS" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ENTERPRISER" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ULTIMATER" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PROR" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\HOMESTUDENTR" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\STANDARDR" /f >nul 2>&1
    reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SMALLBUSINESSR" /f >nul 2>&1
    reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | find /i "Office14."  >>"list"
    if exist "list" for /f %%i in (list) do reg delete "%%i" /f >nul 2>&1
    del /q "list" >nul 2>&1
    echo *** Process Don'e, plz restart ur computer ***&echo.&pause&exit
     
  2. frankogus16

    frankogus16 MDL Novice

    Jul 22, 2010
    1
    0
    0
    where the software?
     
  3. urie

    urie Moderator
    Staff Member

    May 21, 2007
    9,039
    3,388
    300
    Not software it is a script
     
  4. maorosh1

    maorosh1 MDL Novice

    Jun 21, 2010
    17
    14
    0
    i thought u will enter to pastebin dot com / .... i post the link
    but anyway i post it over here too :p
     
  5. ehsan405

    ehsan405 MDL Novice

    Jul 22, 2010
    6
    0
    0
    Hi
    What should I do to run this script ??
    Thank you :)
     
  6. Bosh

    Bosh MDL Developer

    May 30, 2010
    614
    297
    30
    #6 Bosh, Jul 22, 2010
    Last edited: Jul 23, 2010
    - You copy it to notepad and save it as "All files" with any name and the extension ".cmd", for example: "Office Cleanup.cmd" (without quotes)
    - Then you right click the file you've just created and select "run as administrator" and that's it.

    Hope it helps :)
     
  7. urie

    urie Moderator
    Staff Member

    May 21, 2007
    9,039
    3,388
    300
    Should it not be .cmd file .bat files went out with windows 98 :)
     
  8. jmmen

    jmmen MDL Novice

    Jan 6, 2010
    37
    0
    0
    Excellent!!, thks.
     
  9. Cyrillkk

    Cyrillkk MDL Novice

    Jul 11, 2010
    21
    0
    0
    Cmd prompt
     
  10. kingbega

    kingbega MDL Novice

    Feb 22, 2010
    4
    1
    0
    Just a question: this script must be run after office uninstall (in my case office 2010)? Or do unistallation too?
    Thanks in advance and sorry for my bad english
     
  11. Bosh

    Bosh MDL Developer

    May 30, 2010
    614
    297
    30
    In theory it removes everything of Office, but if you have time I suggest you to uninstall Office and then run this tool, just to be sure :)
     
  12. kingbega

    kingbega MDL Novice

    Feb 22, 2010
    4
    1
    0
    Thank you Bosh :)
     
  13. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,681
    18,589
    340
  14. maorosh1

    maorosh1 MDL Novice

    Jun 21, 2010
    17
    14
    0
    i can't post links .. MDL rule's heee
     
  15. Ki

    Ki MDL Novice

    Jun 7, 2011
    21
    1
    0
    #17 Ki, Jun 7, 2011
    Last edited: Jun 7, 2011
    edit: sorted with MicrosoftFixit50416.msi
     
  16. tamagotgi

    tamagotgi MDL Novice

    Nov 18, 2007
    25
    2
    0
    thanks for sharing:D
     
  17. shevactc3

    shevactc3 MDL Novice

    Nov 9, 2011
    12
    0
    0
    Thanks for share :p
     
  18. kekekikot

    kekekikot MDL Novice

    Mar 4, 2010
    1
    0
    0
    Thanks, men
    works perfect!
    very gut script