Solved

upgrade office 2003 to office 2010 bat script

Posted on 2013-01-25
11
862 Views
Last Modified: 2013-03-03
currently we are using the instructions on http://blogs.technet.com/b/odsupport/archive/2011/04/06/how-to-perform-an-uninstall-upgrade-to-office-2010.aspx to upgrade our office to 2010.  We currently have both xp and windows 7 computers and it is a mix of office 2003 and 2007 here.  Windows 7 computers work fine, we reboot them, the script runs, office 2007 is uninstalled and 2010 is installed.  For XP however, regardless of the office versions, we reboot them, the script runs, office 2003 is uninstalled but 2010 is not installed unless we reboot again.

Is there something we are missing on this script for XP computers?  Our group policy is off of a windows 2008 server
0
Comment
Question by:mmercaldi
  • 8
  • 3
11 Comments
 
LVL 7

Expert Comment

by:Scobber
ID: 38825057
What you need to do is use the office customisation tool to create a unattended installation.

Then once that's done save it as custom.msp in the updates folder of the office installation

Call setup.exe from your machines (login script, configuration manager) and it will perform the installation as per your configuration file

to launch the customisation tool copy the contents of the office install to a folder
open a command prompt
navigate to the folder and run "setup /admin"
configure the install script and save back to the installation into the updates subdirectory, calling it custom.msp

To install simply run setup


more info on OCT OCT on Technet
0
 

Author Comment

by:mmercaldi
ID: 38825473
Its not so much a configuration issue, if we run the .bat file by itself it works.  The issue is that it is not working on XP machines
0
 
LVL 7

Expert Comment

by:Scobber
ID: 38825574
using the OCT you can have the office installer perform the uninstall of the previous applications. You can add a Outlook 2010 profile template into the installer.

I use this method to install office on Server 2008/2008R2 XP/7/8

Easiest way to do it.

modify the batch file to check for office 2010 if its not installed run setup

modified batch file from above location

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 "office14." as a prefix. MAKE SURE THIS IS SET CORRECTLY
set ProductName=Office14.PROPLUS

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

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

REM Set LogLocation to a central directory to collect log files. (the user doing the install needs write access)
set LogLocation=\\server\Office2010LogFiles

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
reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
if NOT %errorlevel%==1 (goto End)

REM Check for 32 and 64 bit versions of Office 2010. (Office 64bit would also appear here on a 64bit OS) 
:ARP86
reg query HKEY_LOCAL_MACHINE\SOFTWARE\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
rem <<<<<<<<  REMOVED LINE
start /wait %DeployServer%\setup.exe
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

Open in new window

0
 

Author Comment

by:mmercaldi
ID: 38826593
ill give it a shot, let you know what happens
0
 

Author Comment

by:mmercaldi
ID: 38826732
how do you use oct to unstall office, I did not see it anywhere?  also we used oct for the install.  Is there a way to have the command prompt show up for this script to see where it is failing?
0
Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

 

Author Comment

by:mmercaldi
ID: 38826844
I also managed to get a log on this script, so according to the log it is not reaching stage 3, the cleanup phase, below is the script for that


'------------------------
'Stage # 2 - Msiexec.exe |
'------------------------
sTmp = "Stage # 2 " & chr(34) & "Msiexec.exe" & chr(34) & " (" & Time & ")"
Log vbCrLf & sTmp & vbCrLf & String(Len(sTmp),"=") & vbCrLf
If Not fBypass_Stage2 Then
    MsiexecRemoval
Else
    Log "Skipping Msiexec.exe because bypass was requested."
End If

'--------------------
'Stage # 3 - CleanUp |
'--------------------
'Removal of files and registry settings
sTmp = "Stage # 3 " & chr(34) & "CleanUp" & chr(34) & " (" & Time & ")"
Log vbCrLf & sTmp & vbCrLf & String(Len(sTmp),"=") & vbCrLf
If Not fBypass_Stage3 Then
0
 
LVL 7

Expert Comment

by:Scobber
ID: 38828769
See the attached image, under the Setup Node here is a "Remove Previous Installations" Child. Configure the options in that menu

Cheers
Scobber
oct.png
0
 

Author Comment

by:mmercaldi
ID: 38836719
ill give it a shot
0
 

Author Comment

by:mmercaldi
ID: 38837030
it did not remove office, I edited our OCT MSP file to remove office completely but it did not do that.  Nor did it install office 2010 on our xp computers
0
 

Accepted Solution

by:
mmercaldi earned 0 total points
ID: 38931215
the trick was to run it as a scheduled task through gpedit
0
 

Author Closing Comment

by:mmercaldi
ID: 38946843
unfortunately the only way to do this was to run it as a scheduled task through gpedit
0

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Resolve DNS query failed errors for Exchange
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now