Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Application Management/Install-FireFoxESR.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Mozilla Firefox Install Script
# This script will fetch and then install the most current version of the 32-Bit Mozilla Firefox ESR.
# 2017/03/07 - William.Myers1


# Specify the URL Source for Firefox.
$FireFoxSourceURI = "https://download.mozilla.org/?product=firefox-esr-latest&lang=en-US"

# Specify the location to cache the download
$DownloadLocation = "$ENV:Temp\Firefox Setup esr.exe"

#Define a list of processes to stop
$ProcessesToStop = @(
"Firefox*"
)

# Retrieve the file
Write-host "Retrieving download from $FireFoxSourceURI"
write-host "Downloading file to $DownloadLocation"
Invoke-WebRequest -uri $FireFoxSourceURI -Outfile "$DownloadLocation"

# Stop running processes
foreach ($ProcToStop in $ProcessesToStop){
get-process $ProcToStop -EA SilentlyContinue |Stop-Process -FOrce
}


# Launch the installer.
start-process -filepath "$DownloadLocation" -argumentlist "-MS" -wait


# Delete the global desktop shortcut
IF (Test-path "$ENV:SystemDrive\Users\Public\Desktop\Mozilla Firefox.lnk"){
Remove-item "$ENV:SystemDrive\Users\Public\Desktop\Mozilla Firefox.lnk"}