This project is read-only.

Upgrade IE7 to IE8 (don't laugh!)

Topics: Archive - Deployment Scripts
Jul 22, 2014 at 9:09 PM
I thought I would share this for the people like me who are stuck in the stone age on Windows XP.
#*===============================================
# Variables: Application

$appVendor = "Microsoft"
$appName = "Internet Explorer"
$appVersion = "8.0"
$appArch = "x86"
$appLang = "EN"
$appRevision = "01"
$appScriptVersion = "1.0.0"
$appScriptDate = "01/01/2014"
$appScriptAuthor = "Scott Gilliland"

#*===============================================
# Variables: Script - Do not modify this section

$deployAppScriptFriendlyName = "Deploy Application"
$deployAppScriptVersion = [version]"3.1.3"
$deployAppScriptDate = "05/22/2014"
$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"
#*===============================================
    
    #Check for IE8 already installed
$ieVer = Get-InstalledApplication -Name "Windows Internet Explorer 8"
If ($ieVer -ne $null) {
Exit-Script -ExitCode "06" # I use a custom error code here for tracking.
}

    # Show Welcome Message, close Internet Explorer if required, verify there is enough disk space to complete the install and persist the prompt
    Show-InstallationWelcome -CloseApps "iexplore" -CheckDiskSpace -BlockExecution -CloseAppsCountdown "600"
    
    #This uninstalls the GoogleChromeFrame plugin.
    Execute-MSI MsiExec.exe -Action Uninstall -Path "{E0778312-DB32-3024-9D86-7E20BE94088C}" -ContinueOnError $true 

#*===============================================
#* INSTALLATION 
$installPhase = "Installation"
#*===============================================
    
    #This .exe is a custom creation using IEAK with reboot suppression built in.
    Execute-Process -FilePath "$scriptDirectory\Files\IE8-Setup-Full.exe" -Arguments "/q" -WindowStyle Hidden -IgnoreExitCodes "3010"

#*===============================================
#* POST-INSTALLATION
$installPhase = "Post-Installation"
#*===============================================

    #This checks for a logged on user before selecting a reboot method.  
    $info = gwmi -class win32_computerSystem -ea silentlycontinue | Select-Object username
    if ($info.username.Length -gt 0){
    Show-InstallationRestartPrompt -CountdownSeconds 500 -CountdownNoHideSeconds 120
    }
    else { 
    Execute-Process "Shutdown" -Arguments "/R /F /T 10"
    }
<#Machines with no user logged in do not reboot with Show-InstallationRestartPrompt so it was necessary to identify them and shut them down the old fashioned way.  #>

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

    # Show Welcome Message, close Internet Explorer if required with a 60 second countdown before automatically closing
    Show-InstallationWelcome -CloseApps "iexplore" -CloseAppsCountdown "60"

    # Show Progress Message (with the default message)
    Show-InstallationProgress

#*===============================================
#* 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
#*===============================================
Hopefully none of you are stuck in the same boat as me supporting Windows XP and IE7, but if so that will hopefully help you upgrade to IE8!