File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ # Mozilla Firefox Install Script
2+ # This script will fetch and then install the most current version of the 32-Bit Mozilla Firefox ESR.
3+ # 2017/03/07 - William.Myers1
4+
5+
6+ # Specify the URL Source for Firefox.
7+ $FireFoxSourceURI = " https://download.mozilla.org/?product=firefox-esr-latest&lang=en-US"
8+
9+ # Specify the location to cache the download
10+ $DownloadLocation = " $ENV: Temp \Firefox Setup esr.exe"
11+
12+ # Define a list of processes to stop
13+ $ProcessesToStop = @ (
14+ " Firefox*"
15+ )
16+
17+ # Retrieve the file
18+ Write-host " Retrieving download from $FireFoxSourceURI "
19+ write-host " Downloading file to $DownloadLocation "
20+ Invoke-WebRequest - uri $FireFoxSourceURI - Outfile " $DownloadLocation "
21+
22+ # Stop running processes
23+ foreach ($ProcToStop in $ProcessesToStop ){
24+ get-process $ProcToStop - EA SilentlyContinue | Stop-Process - FOrce
25+ }
26+
27+
28+ # Launch the installer.
29+ start-process - filepath " $DownloadLocation " - argumentlist " -MS" - wait
30+
31+
32+ # Delete the global desktop shortcut
33+ IF (Test-path " $ENV: SystemDrive \Users\Public\Desktop\Mozilla Firefox.lnk" ){
34+ Remove-item " $ENV: SystemDrive \Users\Public\Desktop\Mozilla Firefox.lnk" }
You can’t perform that action at this time.
0 commit comments