January 11, 2013

Office 2010 - bulk deployment/upgrading

### Create default.MSP
\\ServerName\Share\Office2007PPx86\setup.exe /admin
\\ServerName\Share\Office2010wSP1\x64\setup.exe /admin

### Create OfficeInstall.bat
setlocal
IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)
:ARP64
REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
REM Check If Office 2007 Enterprise x86 is installed
reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\ENTERPRISE
if NOT %errorlevel%==1 (goto O2007Un)
REM Check If Office 2007 ProPlus x86 is installed
reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\Office12.ProPlus
if NOT %errorlevel%==1 (goto O2007PPUn)
REM Install office2010x64
start /wait \\ServerName\Share\Office2010wSP1\x64\setup.exe
goto End
:ARP86
REM Install office2010x86
start /wait  \\ServerName\Share\Office2010wSP1\x86\setup.exe
goto End
^O2007PPUn
REM Uninstall Office 2007 ProPlus x86 and deploy Office 2010x64
start /wait \\ServerName\Share\Office2007PPx86\setup.exe /uninstall ProPlus /config \\ServerName\Share\Office2007PPx86\UninstallConfig.xml
start /wait \\ServerName\Share\Office2010wSP1\x64\setup.exe
goto End
:O2007Un
REM Uninstall Office 2007 Enterprise x86 and deploy Office 2010x64
start /wait \\ServerName\Share\Office2007x86\setup.exe /uninstall Enterprise /config \\ServerName\Share\Office2007x86\UninstallConfig.xml
start /wait \\ServerName\Share\Office2010wSP1\x64\setup.exe
:End
Endlocal

### Create UninstallConfig.xml
<Configuration Product="Pro">
<Display Level="None" CompletionNotice="No" SuppressModal="Yes" AcceptEula="Yes" />
<Setting Id="SETUP_REBOOT" Value="Never" />
</Configuration>


Source: http://blogs.technet.com/b/odsupport/archive/2011/04/06/how-to-perform-an-uninstall-upgrade-to-office-2010.aspx

No comments:

Post a Comment