Automatic Removal and Install



Hello,

I am trying to remove Office 2003 and install Office 2007 using startup
scripts through GP. The previous IT guy here set the 2003 installs using GP
to install under the user, not the machine, so using GP to upgrade isn't
going to work.

Here's the script I have so far:

REM Remove Office 2003 Install

msiexec /x {90110409-6000-11D3-8CFE-0150048383C9} /qn

REM *********************************************************************
REM Environment customization begins here. Modify variables below.
REM *********************************************************************

REM Get ProductName from the Office product's core Setup.xml file.
set ProductName=ProPlus

REM Set DeployServer to a network-accessible location containing the Office
source files.
set DeployServer=\\dc3610b\Office2007\

REM Set ConfigFile to the configuration file to be used for deployment REM
(required)
set ConfigFile=\\dc3610b\Office2007\ProPlus.WW\config.xml

REM Set LogLocation to a central directory to collect log files.
set LogLocation=\\vinsystems02\Office12Logs

REM *********************************************************************
REM Deployment code begins here. Do not modify anything below this line.
REM *********************************************************************

IF NOT "%ProgramFiles(x86)%"=="" SET WOW6432NODE=WOW6432NODE\

reg query
HKEY_LOCAL_MACHINE\SOFTWARE\%WOW6432NODE%Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
if %errorlevel%==1 (goto DeployOffice) else (goto End)

REM If 1 returned, the product was not found. Run setup here.
:DeployOffice
start /wait %DeployServer%\setup.exe /config %ConfigFile%
echo %date% %time% Setup ended with error code %errorlevel%. >>
%LogLocation%\%computername%.txt

REM If 0 or other was returned, the product was found or another error
occurred. Do nothing.
:End

Endlocal


This script works perfectly if run while logged in (as an admin, of course).
However, when the computer is set to use the script as a startup script,
Office 2003 is not removed, but the icons for Office 2007 appear in Start
Menu-All Programs-Microsoft Office. Clicking on one of the icons makes
Office 2007 install.

What needs to be done to get this script to run correctly as a startup
script? What I really want it to do is remove Office 2003, then fully
install Office 2007 so the install doesn't try to run under the user account
when opening one of the Office programs.
.



Relevant Pages

  • Re: Deploying Office 07 with Group Policy
    ... computer I tested it on took 30 minutes to install. ... the following script to the Computer Startup Script. ... REM Get ProductName from the Office product's core Setup.xml file. ... REM Set ConfigFile to the configuration file to be used for deployment REM ...
    (microsoft.public.office.setup)
  • Re: Office 2007 Std Group Policy Deployment Failing
    ... Here is the config.xml script ... REM Get ProductName from the Office product's core Setup.xml file. ... REM Set ConfigFile to the configuration file to be used for deployment REM ... When attempting to deploy the installation package via group policy, ...
    (microsoft.public.office.setup)
  • RE: Deploying Office 07 with Group Policy
    ... The error "execution of GPO scripts has timed out and have been terminated" ... the following script to the Computer Startup Script. ... REM Get ProductName from the Office product's core Setup.xml file. ... REM Set ConfigFile to the configuration file to be used for deployment REM ...
    (microsoft.public.office.setup)
  • Re: GPO order for software deployment and scripts
    ... My situation is that I need to run a script before MS Office 2003 Software ... install and another script after install. ... and has link order of "2". ... During the next boot, a software deployment ...
    (microsoft.public.windows.group_policy)
  • RE: post import scripting
    ... easily write one script to import and install MSIs, then import bindings, ... new deployment functionality in the 2006 release. ... MSI scripts can't access resources which are being created or modified ... I'm not sure why when running a script during install, ...
    (microsoft.public.biztalk.general)

Loading