Solved

upgrade office 2003 to office 2010 bat script

Posted on 2013-01-25
11
879 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
[X]
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
  • 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
A hard and fast method for reducing Active Directory Administrators members.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

734 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