/build/static/layout/Breadcrumb_cap_w.png

uninstall command line question

Managed install for Office 2013.
Need to uninstall Office 2007 and 2010.

I created a managed install to deploy microsoft office 2013.  It works great, however I would like to uninstall previous versions of Office at the same time using the Managed Install.  Question is: Do i put the uninstall command in front of the install command in the Full Command Line box?  Or do i have to zip up the uninstall command with the associated zip file?

0 Comments   [ + ] Show comments

Answers (3)

Answer Summary:
Posted by: Badger 8 years ago
Red Belt
2

Top Answer

Did you use the built in tool to customise your installation??

If you did you would have seen the option on removing prev versions. by default it will remove all prev versions, so you don't actually have to do anything.


Comments:
  • I did, and it does remove the versions but when i go to the add/remove programs 2010 is still listed - rpsolis 8 years ago
Posted by: rajumaddu 8 years ago
White Belt
1
Can you tell me the entry of the software in "Programs and Features"? So that I can give you a script to uninstall any software by using that entry.

save the below script as .vbs file after changed the underlined name by your software name.

On Error Resume Next
const AppName = "VLC media player"

const HKEY_LOCAL_MACHINE = &H80000002

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

'First, find the GUID 
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_ 
    strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
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, Uninstalling...
       WshShell.Run "msiexec /x " & GUID & " /qn"
   Exit For
End If
    End If
Next

Comments:
  • Microsoft Office Professional Plus 2010 - rpsolis 8 years ago
    • >I did, and it does remove the versions but when i go to the add/remove programs 2010 is still listed

      You did F5 (Refresh) the view on ARP, right? Sometimes, it doesn't update in real-time, it has to be encouraged! :-) - anonymous_9363 8 years ago
      • ok, ill try that...thanks! :) - rpsolis 8 years ago
Posted by: Badger 8 years ago
Red Belt
0

I forgot an important little bit of info about this.....

Microsoft have something to help you out on this.

https://blogs.technet.microsoft.com/odsupport/2011/04/08/how-to-obtain-and-use-offscrub-to-automate-the-uninstallation-of-office-products/

We use one where we are for office 2010 removal.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ