Downgrade/ Replace Microsoft Office 2013 Professional Plus to Standard

This post will address the second requirement mentioned in my previous post.  In summary, we detected unauthorized installations of Microsoft Office 2013 Professional Plus and now we need to uninstall and replace these rogue installations with the Standard version.

For this tutorial, I am going to assume you already know how to create collections and work with queries as well as task sequences.

I am also only going to focus on the MSDN media types, but you can adapt the steps for the Retail versions by substituting the MSI’s for Retail instead of using the MSDN ones.

Collection

We need to create a collection of all the computers that currently have Professional Plus installed.  We will then script out a task sequence to uninstall Professional Plus (MSDN and Retail) and install Standard in one motion because if we run the uninstall separately, the computers will drop off the collection as they are being uninstalled.

This is because we will create the collection using a query instead of direct memberships since the latter will take forever to input, not to mention, I find it very difficult to maintain.

Create a collection and add the following query:

select
SMS_R_SYSTEM.ResourceID,
SMS_R_SYSTEM.ResourceType,
SMS_R_SYSTEM.Name,
SMS_R_SYSTEM.SMSUniqueIdentifier,
SMS_R_SYSTEM.ResourceDomainORWorkgroup,
SMS_R_SYSTEM.Client
from
SMS_R_System
inner join
SMS_G_System_ADD_REMOVE_PROGRAMS
on
SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId
where
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "Microsoft Office Professional Plus 2013%"
and
SMS_G_System_ADD_REMOVE_PROGRAMS.Version like "%" order by SMS_R_System.Name

That’s it for this step.

SilentUninstallConfig.xml

Create a XML file named “SilentUninstallConfig.xml” and save it in your “[Product Code].ww” folder in the root of your installation source files. The contents of SilentUninstallConfig.xml is below:

<Configuration Product="Standard">
<Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
</Configuration>

Task Sequence

We will now create a task sequence which will be advertised to the above collection.

  1. In the Administrator Console, go to your task sequences and right click and create a new custom task sequence.
    TS_Office15_1
  2. Make sure to name the task sequence something descriptive, mine is “Microsoft Office 2013 Standard”.  Then click Next all the way until the task sequence is created.
    TS_Office15_2
  3. Right-click and Edit the newly created task sequence.
  4. Create two folders for organizational purposes.  The first folder will group the uninstall commands for Professional Plus.  The second folder will group the install commands for Standard.  For the uninstall group command lines, you will need to have access to each media type that you want to target because you will need to import each respective MSI as a condition to each step.
    TS_Office15_3
  5. In the uninstall group, we will add the first step to detect and uninstall the MSDN version of Professional Plus x64.  Add a “Run Command Line” with the following command:
    cmd.exe /c \\[Path to ProPlus installation source]\x64\setup.exe /uninstall ProPlus /config \\[Path to ProPlus installation source]\x64\proplus.ww\SilentUninstallConfig.xml
    TS_Office15_4
    If you’re using Retail media the “ProPlus” must be substituted with “ProPlusr”.
    Add a “Run As” account that has at least ‘Read” permission to the installation source files because task sequences run as the “Local System” account and will not have access to the network share.
    In the “Options” tab, click on “Add condition” and click on “Operating System Version”:
    TS_Office15_6
    Again in the “Options” tab, click on “Add condition” and then click on “Installed Software”.  You will now need to browse to the installation source files and import the MSI inside the “ProPlus.ww” folder:
    TS_Office15_5
    When finished, the conditions for this step should look like this:
    TS_Office15_7
  6. If you want to detect and uninstall the x86 version of Professional Plus, repeat step 5 and use the following command:
    cmd.exe /c \\[Path to ProPlus installation source]\x86\setup.exe /uninstall ProPlus /config \\[Path to ProPlus installation source]\x86\proplus.ww\SilentUninstallConfig.xml
    Again, if you’re using Retail media the “ProPlus” must be substituted with “ProPlusr”.
    For the x86 version you only need to add one condition because the x86 version can also be installed in x64 operating systems.  Add the “Installed Software” condition and import the x86 MSI.
    When finished, the ‘Options” tab should look like the following:
    TS_Office15_9
  7. For the Retail versions, repeat steps 5 and 6.  The only thing that changes is you have to import the specific MSI for the retail versions.  You don’t need to point the command lines to each Retail’s media setup.exe.  The ProPlus setup.exe is sufficient, but you will need to change the “ProPlus” to “ProPlusr” in each command line right after the “/uninstall”.
  8. Once finished with the uninstall commands, let’s turn our attention to the install group.  Add a “Install Application” step and select the Microsoft Office 2013 Standard application we created in the previous post.  This step does not need conditions because it will install on both x86 and x64 architectures.
    TS_Office15_10
  9. Optional:  In my organization, we have a problem with Windows 8.1 systems which are unable to read the SRV records for our KMS in our local DNS.  Therefore, Microsoft Office 2013 Standard installs but doesn’t activate.  We can add two “Run Command Line” steps to manually point each installation to the KMS server and activate against it.
    The first command line is meant to activate Standard x86 on a 64-bit Operating System.  It is composed of the following command line:
    cmd.exe /c cscript.exe "%ProgramFiles(x86)%\Microsoft Office\Office15\ospp.vbs" /sethst:[FQDN of KMS Server] & cscript.exe "%ProgramFiles(x86)%\Microsoft Office\Office15\ospp.vbs" /setprt:[Port number; default is 1688] & cscript.exe "%ProgramFiles(x86)%\Microsoft Office\Office15\ospp.vbs" /act
    TS_Office15_11
    It has the following conditions, “Operating System” is set to “All Windows 8 64-bit” or “All Windows 8.1 64-bit” and Registry Key “HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{90150000-0012-0000-1000-0000000FF1CE}” with value “DisplayName” exists.
    TS_Office15_12

    The second command line is meant to activate Standard x86 on a 32-bit Operating System.  It is composed of the following command line:
    cmd.exe /c cscript.exe "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" /sethst:[FQDN of KMS Server] & cscript.exe "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" /setprt:[Port number; default is 1688] & cscript.exe "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" /act
    TS_Office15_13
    It has the following conditions, “Operating System” is set to “All Windows 8 32-bit” or “All Windows 8.1 32-bit” and Registry Key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90150000-0012-0000-1000-0000000FF1CE}” with value “DisplayName” exists.
    TS_Office15_14

Once complete, deploy the task sequence to the above created collection and it should uninstall Microsoft Office 2013 Professional Plus and install Microsoft Office 2013 Standard x86.

Advertisements

2 thoughts on “Downgrade/ Replace Microsoft Office 2013 Professional Plus to Standard

    1. rcheing Post author

      Great question! If the Office files are being used, the uninstall task will force auto-close the Office application as long as you ran it as a “silent uninstall”. More information is available at Technet, Setup command-line options reference for Office 2013:

      …In enterprise deployments, we recommend that you run a silent uninstall to prevent prompting users to enter information, and to prevent the installation from waiting for user interactions, even when files are being used.

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s