Install Office 2013 using Group Policy has issues removing Office 2007

AWS

Owner
FPCH Owner
Joined
Nov 19, 2003
Messages
10,976
Location
Florida U.S.A.
I am trying to script the installation of Office 2013 over the top of an existing Office 2007 installation. My script looks like this:
setlocal
REM *********************************************************************
REM Environment customization begins here. Modify variables below.
REM *********************************************************************
REM Get ProductName from the Office product's core Setup.xml file, and then add "office15." as a prefix.
set ProductName=Office15.STANDARD
REM Set DeployServer to a network-accessible location containing the Office source files.
set DeployServer=\DEPLOYMENTPATH
REM Set LogLocation to a central directory to collect log files.
set LogLocation=DEPLOYEMNTPATHLogFiles
REM *********************************************************************
REM Deployment code begins here. Do not modify anything below this line.
REM *********************************************************************
IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)
REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
:ARP64
echo ARP64
pause
reg query HKEY_LOCAL_MACHINESOFTWAREWOW6432NODEMicrosoftWindowsCurrentVersionUninstall%ProductName%
if NOT %errorlevel%==1 (goto End)
REM Check for 32 and 64 bit versions of Office 2013 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS)
:ARP86
echo ARP86
pause
reg query HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall%ProductName%
if %errorlevel%==1 (goto DeployOffice) else (goto End)
REM If 1 returned, the product was not found. Run setup here.
:DeployOffice
echo Please wait.
echo Installing Microsoft Office 2013
start /wait %DeployServer%setup.exe /adminfile %DeployServer%updatescustom.msp
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
I call this script from a GP Startup Script. I created the MSP file using the OCT.
When I boot the computer it will run the O2013 installer and then finishes and gets to the CTL-ALT-DEL prompt, but when I logon to the computer it still reports O2007 is installed.
If I reboot the computer then O2013 installer runs again and when it finishes and I logon it reports O2103 is now installed.
My problem is that I have found noway to get the computer to reboot automatically after the O2013 installer first runs. Setting the OCT value SYSTEM_REBOOT=AUTOALWAYS does not force a reboot.
Adding the command
SHUTDOWN /r /t 0
to the end of the logon script does not do anything. After the O2013 installer finishes it does not appear that any more script commands are executed and no further GP Startup script processing occurs.
Anyone got any advice on how I can force the reboot so that the second installer action takes effect before the user logs on?


View this thread
 
Back
Top