This project is read-only.

Remove office viewers, clean off old version of office and install office

Topics: Archive - Deployment Scripts
Jul 18, 2014 at 4:11 PM
You'll of course need the office clean up scripts. Just google OffScrub10.vbs and you'll find it.
Also you might have different versions of the office viewers installed so you'll have to find the MSI codes. Remove-MSI didn't see to work all the time for me.

*===============================================

* PRE-INSTALLATION

If ($deploymentType -ne "uninstall") { $installPhase = "Pre-Installation"

*===============================================

# Perform pre-installation tasks here
Execute-Process -FilePath "msiexec.Exe" -Arguments "/X{95120000-003F-0409-0000-0000000FF1CE} /qn REBOOT=ReallySuppress" -ContinueOnError $true
Execute-Process -FilePath "msiexec.Exe" -Arguments "/X{90850409-6000-11D3-8CFE-0150048383C9} /qn REBOOT=ReallySuppress" -ContinueOnError $true
Execute-Process -FilePath "msiexec.Exe" -Arguments "/X{95140000-00AF-0409-0000-0000000FF1CE} /qn REBOOT=ReallySuppress" -ContinueOnError $true
Execute-Process -FilePath "msiexec.Exe" -Arguments "/X{90120000-0020-0409-0000-0000000FF1CE} /qn REBOOT=ReallySuppress" -ContinueOnError $true


Execute-Process -FilePath "CScript.Exe" -Arguments ""$dirSupportFiles\OffScrub10.vbs" STANDARD,Proplus /S /Q /NoCancel" -WindowStyle Hidden -IgnoreExitCodes "1,2,3"
Execute-Process -FilePath "CScript.Exe" -Arguments ""$dirSupportFiles\OffScrub07.vbs" STANDARD,Proplus /S /Q /NoCancel" -WindowStyle Hidden -IgnoreExitCodes "1,2,3"
Execute-Process -FilePath "CScript.Exe" -Arguments ""$dirSupportFiles\OffScrub03.vbs" STANDARD,Proplus /S /Q /NoCancel" -WindowStyle Hidden -IgnoreExitCodes "1,2,3"

*===============================================

* INSTALLATION

$installPhase = "Installation"

*===============================================

# Perform installation tasks here
execute-process -FilePath "setup.exe" -Arguments "/adminfile yourownMSP.msp"

*===============================================

* POST-INSTALLATION

$installPhase = "Post-Installation"

*===============================================

# Perform post-installation tasks here

# Display a message at the end of the install
#Show-InstallationPrompt -Message "You can customise text to appear at the end of an install, or remove it completely for unattended installations." -ButtonRightText "Ok" -Icon Information -NoWait

*===============================================

* UNINSTALLATION

} ElseIf ($deploymentType -eq "uninstall") { $installPhase = "Uninstallation"

*===============================================

execute-process -FilePath "setup.exe" -Arguments "/uninstall yourversion"

*===============================================