Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

upgrade office 2003 to office 2010 bat script

Posted on 2013-01-25
11
Medium Priority
?
912 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

596 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