Changes

MS Office 2010

3,819 bytes added, 14:43, 6 May 2011
m
Created page with "=MS Office 2010= For this install, create a custom MSP file by running the Office setup.exe with /admin. Customise the installation you require (don't install Outlook etc. One..."
=MS Office 2010=

For this install, create a custom MSP file by running the Office setup.exe with /admin. Customise the installation you require (don't install Outlook etc. One tip, if installing Access, also install 'Visual Basics'). The MSP file can be saved outside the documents \upgrades directory if you wish to.

<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<packages>

<package id="msoffice2010" name="Microsoft Office 2010" revision="1" reboot="false" priority="72">

<check type="uninstall" condition="exists" path="Microsoft Office Professional Plus 2010" />

<install cmd='%comspec% /C start "" /WAIT "%SOFTWARE%\office\msoffice10\source_files\setup.exe" /adminfile "%SOFTWARE%\office\msoffice10\maths_config\maths_base_install.MSP"' >
<exit code="1641" />
<exit code="3010" />
</install>

<upgrade cmd='%comspec% /C start "" /WAIT "%SOFTWARE%\office\msoffice10\source_files\setup.exe" /adminfile "%SOFTWARE%\office\msoffice10\maths_config\maths_base_install.MSP"' >
<exit code="1641" />
<exit code="3010" />
</upgrade>

<remove cmd='%comspec% /C start "" /wait "%SOFTWARE%\office\msoffice10\source_files\setup.exe" /uninstall ProPlus /config "%SOFTWARE%\office\msoffice10\maths_config\silentuninstall.xml"' >
<exit code="3010" />
</remove>


</package>

</packages>
</source>

To remove Office 2010, as per Office 2007, create a file (silentuninstall.xml) containing:

<source lang="xml">
<Configuration Product="ProPlus">
<Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
<Setting Id="SETUP_REBOOT" Value="NEVER" />
</Configuration>
</source>

The line '<Setting Id="SETUP_REBOOT" Value="NEVER" />' sops the pc rebooting when Office is removed, omitting this line <u>will</u> reboot your pc without you being asked!

To activate Office via KMS, a 'dependant' WPKG XML file is created.

<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<packages>

<package id="msoffice2010-activation" name="Activation MS Office 2010" revision="1" reboot="false" priority="71">

<depends package-id="msoffice2010" />
<variable name="update" value="01" />
<check type="execute" path="%software%\office\msoffice10\maths_config\activation.bat" condition="exitcodeequalto" value="0" />
<check type="file" condition="exists" path="%PROGRAMFILES%\Microsoft Office\Office14\WORDIRM.XML.%update%" />

<!-- First make a backup of the a random file, WORDIRM.XML file. This is used for the <remove /> part of this file as there isn't
an uninstaller for the update therefore we need to uninstall something to make the <check /> work so that we can then uninstall
the main Maple program-->
<install cmd='%COMSPEC% /c copy /y "%PROGRAMFILES%\Microsoft Office\Office14\WORDIRM.XML" "%PROGRAMFILES%\Microsoft Office\Office14\WORDIRM.XML.%update%"' >
<exit code="any" />
</install>
<!-- Now do the KMS... -->
<install cmd='"%SYSTEMROOT%\system32\cscript" "%PROGRAMFILES%\Microsoft Office\Office14\OSPP.vbs" /sethst:kms.somewhere.over.the.rainbow' />
<install cmd='"%SYSTEMROOT%\system32\cscript" "%PROGRAMFILES%\Microsoft Office\Office14\OSPP.vbs" /act' />

<remove cmd='%COMSPEC% /c del /q "%PROGRAMFILES%\Microsoft Office\Office14\WORDIRM.XML.%update%"' />

<!--
To check Office is activated, run
cscript "c:\program files\Microsoft Office\Office14\OSPP.vbs" /dstatus
-->

</package>

</packages>

</source>

So that this package can be uninstalled, a random file in c:\program files\Microsoft Office\office14\ is copied, a 'check' added and the <remove> line removes this copied file.

activation.bat =

<pre>
@echo off

%Systemroot%\system32\cscript "%ProgramFiles%\Microsoft Office\Office14\OSPP.vbs" /dstatus | find "---LICENSED---"
exit %errorlevel%
</pre>


[[category:Silent Installers]]
[[Category:Microsoft Office]]