Software Deployment Question

uninstall command line question

03/29/2016 753 views
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?
Answer Summary:
0 Comments   [ + ] Show comments


Answer Chosen by the Author


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.

Answered 03/29/2016 by: Badger
Red Belt

  • I did, and it does remove the versions but when i go to the add/remove programs 2010 is still listed

Community Chosen Answer

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
Answered 03/31/2016 by: rajumaddu
White Belt

  • Microsoft Office Professional Plus 2010
    • This content is currently hidden from public view.
      Reason: Removed by member request For more information, visit our FAQ's.
    • >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! :-)
      • ok, ill try that...thanks! :)

All Answers


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

Microsoft have something to help you out on this.


We use one where we are for office 2010 removal.

Answered 04/01/2016 by: Badger
Red Belt

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