Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

upgrade office 2003 to office 2010 bat script

Posted on 2013-01-25
11
869 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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
 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

OfficeMate Freezes on login or does not load after login credentials are input.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

828 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