this was made using PADT version 3.1.0
might need some updating. But it will get you started
Param (
[ValidateSet(“Install”,“Uninstall”)]
[string] $DeploymentType = “Install”,
[ValidateSet(“Interactive”,“Silent”,“NonInteractive”)]
[string] $DeployMode = “Interactive”,
[switch] $AllowRebootPassThru = $false,
[switch] $TerminalServerMode = $false
)
#===============================================
# VARIABLE DECLARATION
Try {
#*===============================================
#*===============================================
Variables: Application
$appVendor = “Microsoft”
$appName = “Remove Viewers Add Office 2010”
$appVersion = “”
$appArch = “”
$appLang = “”
$appRevision = “01”
$appScriptVersion = “1.0.0”
$appScriptDate = “03/28/2014”
$appScriptAuthor = “”
#*===============================================
Variables: Script - Do not modify this section
$deployAppScriptFriendlyName = “Deploy Application”
$deployAppScriptVersion = [version]“3.1.0”
$deployAppScriptDate = “02/25/2013”
$deployAppScriptParameters = $psBoundParameters
Variables: Environment
$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Definition
Dot source the App Deploy Toolkit Functions
."$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1"
#===============================================
# END VARIABLE DECLARATION
#*===============================================
#===============================================
# 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 PROPLUS”
#===============================================
# END SCRIPT BODY
} } Catch { $exceptionMessage = “$($.Exception.Message) ($($
.ScriptStackTrace))”; Write-Log “$exceptionMessage”; Show-DialogBox -Text $exceptionMessage -Icon “Stop”; Exit-Script -ExitCode 1 } # Catch any errors in this script
Exit-Script -ExitCode 0 # Otherwise call the Exit-Script function to perform final cleanup operations
#*===============================================