37 lines
1.2 KiB
PowerShell
37 lines
1.2 KiB
PowerShell
<#
|
|
Author: Gabe Kerntke
|
|
Date: 04-29-2026
|
|
|
|
.Synopsis
|
|
Function checks the exitcode
|
|
|
|
.Modified
|
|
2026-04-29 (GabeK) - Original script created
|
|
#>
|
|
|
|
Set-StrictMode -Version 2.0
|
|
|
|
#Function checks the exitcode
|
|
Function Read-ExitCode {
|
|
If ($ExitCode -eq 0) {
|
|
Write-Host "Script was Successful"
|
|
Start-Sleep 10
|
|
(Get-Software | Select-Object DisplayName, DisplayVersion | Where-Object { $_.DisplayName -like "*$App_Name*" } | Format-List | Out-string).Trim()
|
|
Remove-Item $Dest_File -Force -ErrorAction SilentlyContinue
|
|
}
|
|
ElseIf ($ExitCode -eq 3010) {
|
|
Write-Host "Script was Successful, but a reboot is required."
|
|
Start-Sleep 10
|
|
(Get-Software | Select-Object DisplayName, DisplayVersion | Where-Object { $_.DisplayName -like "*$App_Name*" } | Format-List | Out-string).Trim()
|
|
Remove-Item $Dest_File -Force -ErrorAction SilentlyContinue
|
|
}
|
|
ElseIf ($ExitCode -eq 1642) {
|
|
Write-Host "MUI version not detected, please reinstall Adobe to update."
|
|
Remove-Item $Dest_File -Force -ErrorAction SilentlyContinue
|
|
}
|
|
Else {
|
|
Write-Host `n
|
|
Write-Host "Failed... Exit Code:"$ExitCode
|
|
Remove-Item $Dest_File -Force -ErrorAction SilentlyContinue
|
|
}
|
|
} |