Announcement

Collapse
No announcement yet.

Removing multiple versions of Office

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Removing multiple versions of Office

    We have a client that is migrating to Office 365 Business Premium. Unfortunately for us, and a network of about 40 or so computers, we're looking at a mix of current Office installs ranging from 2007 (I beleive), 2010 to 2013.

    We have a script setup to install Office 365 Business Premium via our Remote Management software.

    They are in a domain, and I know in that environment, I can use GP to accomplish what we want to do, however... We're looking to save time and if we can push an uninstall script from our RM software to every computer then we don't have to ensure that the systems are physically in the office. We can just tell the RM software to run the script(s) when the computer is turned on. They have two locations throughout our state that are only connected via VPN. We don't want the DC to have bear the burden of this install.

    The problem I'm running into is two fold:

    1) the scripts that I'm finding appear to be geared towards beginners with things like Echo followed by some text in there. Basically letting the user know what's going on and some ask for user interaction. I need this to be completely silent and just blow out whatever version of Office they have installed.

    2) There are a mix of previous Office installs spread throughout their company.

    I don't know enough about batch files and/or PS scripts to remove the multiple versions of office.

    Any help out there?
    I'd rather check my Facebook than face my checkbook...

    Thanks,
    Todd

  • #2
    I found this, which looks like what I need, however, it appears that this would be 3 to 4 separate batch files we'd have to run rather than just 1 to include all version removals.


    For Office 2007:

    Echo OFF
    cls
    TITLE Uninstalling Office. . .

    wmic product where "name like 'Microsoft Office 2007'" call uninstall /nointeractive
    wmic product where "name like 'Microsoft Office Professional Hybrid 2007'" call uninstall /nointeractive
    goto END

    :END
    pause
    exit



    Office 2010:

    Echo OFF
    cls
    TITLE Uninstalling Office. . .

    wmic product where "name like 'Microsoft Office 2010 Professional'" call uninstall /nointeractive
    wmic product where "name like 'Microsoft Single Image 2010'" call uninstall /nointeractive
    goto END

    :END
    pause
    exit

    For Office 2003: This one is unsure as we dont have it.

    Echo OFF
    cls
    TITLE Uninstalling Office. . .

    wmic product where "name like 'Microsoft Office 2003 Professional'" call uninstall /nointeractive
    wmic product where "name like 'Microsoft Single Image 2003'" call uninstall /nointeractive

    wmic product where "name like 'Microsoft Office 2003'" call uninstall /nointeractive

    goto END

    :END
    pause
    exit
    I'd rather check my Facebook than face my checkbook...

    Thanks,
    Todd

    Comment


    • #3
      Have a look at the following Uninstall script for multiple versions of Office . There should be something that will work for you. Sorry Todd, but my scripting ability is world renown to be shite so that is the best that I can do.

      If you have problems uninstalling some instances, you can force it using Uninstall Office from a PC .

      There is also Microsoft Fix It Available to Uninstall Office Suites . They are a Microsoft tool with an .msi extension so they can be run using a GPO but they only go as far as Office 2010.

      Last edited by biggles77; 22nd August 2017, 15:51.
      1 1 was a racehorse.
      2 2 was 1 2.
      1 1 1 1 race 1 day,
      2 2 1 1 2

      Comment


      • #4
        I appreciate it, but the link is broken.

        Our RM software actually has scripting built in so I'm trying to create it from within there and I have it actually running against the registry. Now I've got to figure out how to force it to uninstall.
        I'd rather check my Facebook than face my checkbook...

        Thanks,
        Todd

        Comment


        • #5
          Sorry, I stuffed something up but it is working now. If you read some of the links in the now fixed link then you will find out how to do what you want. Spoiler alert, GUID.

          How many machines do you have?
          Have you asked the RM software vendor what they suggest to achieve your goal?
          1 1 was a racehorse.
          2 2 was 1 2.
          1 1 1 1 race 1 day,
          2 2 1 1 2

          Comment


          • #6
            We have about 20 machines. Yeah, I got with the RM support yesterday evening and they basically said, "Here's a link to our scripting help area, go find what you need". I'm trying that but basically I need to uninstall Office 2007, Office 2010 and Office 2013 plus Lync 2013 if it's not scrubbed by the Office 2013 uninstaller.

            Once I have the script, a single script to just run the uninstaller silently, or scrub the machines of any verisons of office they have, then I can add that single script to our RM software and we can push that when we want.

            Right now, it's looking like I might have to make individual scripts and run them on specific machines to accomplish what I need to.

            I was hoping that the O365 Business Premium installer would remove previous versions but I also don't want to rely solely on that.

            Checking your link out now....
            I'd rather check my Facebook than face my checkbook...

            Thanks,
            Todd

            Comment


            • #7
              Originally posted by biggles77 View Post
              Have a look at the following Uninstall script for multiple versions of Office . There should be something that will work for you. Sorry Todd, but my scripting ability is world renown to be shite so that is the best that I can do.

              If you have problems uninstalling some instances, you can force it using Uninstall Office from a PC .

              There is also Microsoft Fix It Available to Uninstall Office Suites . They are a Microsoft tool with an .msi extension so they can be run using a GPO but they only go as far as Office 2010.
              That Google search is virtually the same one I've been doing, most of those links, I've visited. There's a lot of good information there, but not specifically what I'm looking for, or a decent foundation of what I'm looking for.

              I'm not well versed in scripting, myself...

              I think, since we're looking at only about 20 to 21 computers, that we're going to manually uninstall through our RM software which should buy me enough time to get a script together for long term use in other client environments.

              Naturally, I'll post what I find, or create, here for the masses!
              I'd rather check my Facebook than face my checkbook...

              Thanks,
              Todd

              Comment


              • #8
                Very crude, but this is what I have so far. I just need to make it run silently...

                This is in a batch file...

                cd c:\program files (x86)
                cd common files
                cd microsoft shared
                cd office14
                cd office setup controller
                setup.exe /uninstall STANDARD /dll OSETUP.dll

                For some reason, when I type cd C:\the whole path it can't find the path so I have to break it up like this.

                If I run this batch file as administrator, the uninstaller opens up (which I don't want it to do) and asks me if I want to uninstall yes or no (which I want it to automatically choose yes).

                So I'm over halfway there...

                Any further assistance would be great!


                I'd rather check my Facebook than face my checkbook...

                Thanks,
                Todd

                Comment


                • #9
                  For some reason, when I type cd C:\the whole path it can't find the path so I have to break it up like this
                  I don't know your scripting program but it may be due to you having spaces in the path.
                  It may not like parenthesis ( ) .
                  1 1 was a racehorse.
                  2 2 was 1 2.
                  1 1 1 1 race 1 day,
                  2 2 1 1 2

                  Comment


                  • #10
                    How about this: when most software installs, there's an 'Uninstall' reg key written with the actual command for the removal. On a Win10 client, this can be found at:
                    'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Un install'. You'll see a list of GUIDs there, just click on each one and look in the right pane to see what DisplayName shows up. Look for installed examples of each of your Office versions, and make note of the value in the key 'UninstallString'. That's the cmd line entry you want to remove that software, and each Office version will have a different GUID. NOTE: the existing command shown will be '.../x{GUID}' with no spaces between the cmd switch and the GUID value. When you use that cmd, put a space in between and add a '/qn' switch on the end to tell MSIEXEC to run silent. If each remove cmd is inside an IF statement, that IF can see if that specific key exists, and if so, run the removal. All of those can be in one script, so every version you want to remove is pulled, silently. The only gotcha is whether the client will want a restart, and I've given up trying to predict when one will be needed---even if the software doesn't tell you it wants one, sometimes it just won't work until you do.
                    *RicklesP*
                    MSCA (2003/XP), Security+, CCNA

                    ** Remember: credit where credit is due, and reputation points as appropriate **

                    Comment

                    Working...
                    X