I would like to have a script uninstall Office 2007 Pro and install Office 2013 Standard.  If I just do an Office 2013 upgrade, Access 2007 and some other programs still are on the computer, so that's why I'm uninstalling 2007 and then installing 2013.

I wrote a script to uninstall Office 2007 Pro - works great. I also added Office 2013 Standard in Distribution and this works.  Now, I'm trying to combine both of them.  It uninstalls 2007, says that Office 2013 was installed, but it wasn't.

I first copied the uninstall Office 2007 Pro script, renamed it, and modified it to include the installation of Office 2013.  Here is the script.  Please feel free to modify - I'm a newbie and may have other things that aren't necessary.  Thanks in advance for your help!

<?xml version="1.0" encoding="utf-8" ?>
<kbots xmlns="http://kace.com/Kbots.xsd">
<kbot>

<config name="Uninstall 2007 Office Pro &amp; Install 2013 Standard" type="policy" id="55" version="1483720608" description="">

  <execute disconnected="true" logged_off="true">
  </execute>

</config>

<compliance>

  <verify on_failure="break" attempts="2">

    <registry_value_is key="HKEY_LOCAL_MACHINE\SOFTWARE\Kace\KBot Configuration\Uninstall0" name="key" expectedValue="414558625" />

    <on_verify_success>
      <launch_program path="&quot;c:\program files (x86)\common files\microsoft shared\office12\office setup controller&quot;" program="setup.exe" wait="true" parms="/config uninstalloffice.xml /uninstall PROPLUS /dll OSETUP.DLL " />
    </on_verify_success>

    <on_verify_failure>
      <set_registry_value key="HKEY_LOCAL_MACHINE\SOFTWARE\Kace\KBot Configuration\Uninstall0" name="key" type="REG_SZ" newValue="414558625" />
      <launch_program path="&quot;C:\Program Files (x86)\Common Files\microsoft shared\OFFICE12\Office Setup&quot;" program="setup.exe" wait="true" parms=" /config uninstalloffice.xml /uninstall PROPLUS /dll OSETUP.DLL " />

      <on_remediation_success>
      </on_remediation_success>

      <on_remediation_failure>
      </on_remediation_failure>

    </on_verify_failure>

  </verify>

  <verify on_failure="break" attempts="1">

    <registry_value_is key="HKEY_LOCAL_MACHINE\SOFTWARE\Kace\KBot Configuration\Uninstall0" name="key" expectedValue="414558625" />

    <on_verify_success>
      <install software_id="1439" name="Microsoft Office Standard 2013" install_cmd="" download_location="http://vk1000.mislan.local/packages/1439/office 2013 standard-full.zip" checksum="9b7a0cfb9f8419733414eb50675cb756" flags="DZ" />
    </on_verify_success>

    <on_verify_failure>
      <set_registry_value key="HKEY_LOCAL_MACHINE\SOFTWARE\Kace\KBot Configuration\Uninstall0" name="key" type="REG_SZ" newValue="414558625" />
      <install software_id="1439" name="Microsoft Office Standard 2013" install_cmd="" download_location="http://vk1000.mislan.local/packages/1439/office 2013 standard-full.zip" checksum="9b7a0cfb9f8419733414eb50675cb756" flags="" />

      <on_remediation_success>
      </on_remediation_success>

      <on_remediation_failure>
      </on_remediation_failure>

    </on_verify_failure>

  </verify>

</compliance>

</kbot>
</kbots>

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1
Hi,
try this as a starting point....

https://support.microsoft.com/en-us/kb/971179


Cheers
Phil
Answered 01/06/2017 by: Pressanykey
Red Belt

  • Thanks Phil! I do have the Office 2007 uninstall working, and the Office 2013 install working. I'm having problems running one after the other.
    • Hi Janet,
      personally you should keep the two as separate packages and try not to combine them. If you later have errors in the productive environment this makes finding them very difficult.
      Go for two "deployment" packages, one that cleanly de-installs the older office version, the other to install the "newer" version.

      Phil
      • Thanks Phil! Solves that problem.
Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share