2024-11-08 12:38:20 +01:00
|
|
|
The *firefox-installer.ps1* Script
|
|
|
|
===========================
|
2023-10-19 08:12:00 +02:00
|
|
|
|
|
|
|
Download and install latest firefox
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
----------
|
|
|
|
```powershell
|
2024-11-08 12:35:11 +01:00
|
|
|
/home/markus/Repos/PowerShell/scripts/firefox-installer.ps1 [<CommonParameters>]
|
2023-10-19 08:12:00 +02:00
|
|
|
|
|
|
|
[<CommonParameters>]
|
|
|
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
|
|
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
|
|
|
```
|
|
|
|
|
|
|
|
Example
|
|
|
|
-------
|
|
|
|
```powershell
|
|
|
|
PS> ./firefox-installer.ps1
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
Notes
|
|
|
|
-----
|
|
|
|
Author: Dark Master | License: CC0-1,0
|
|
|
|
|
|
|
|
Related Links
|
|
|
|
-------------
|
|
|
|
https://github.com/pakoti/Awesome_Sysadmin
|
|
|
|
|
|
|
|
Script Content
|
|
|
|
--------------
|
|
|
|
```powershell
|
|
|
|
<#
|
|
|
|
.SYNOPSIS
|
|
|
|
firefox installer
|
|
|
|
.DESCRIPTION
|
|
|
|
Download and install latest firefox
|
|
|
|
.EXAMPLE
|
2023-12-07 20:24:45 +01:00
|
|
|
PS> ./firefox-installer.ps1
|
2023-10-19 08:12:00 +02:00
|
|
|
.LINK
|
|
|
|
https://github.com/pakoti/Awesome_Sysadmin
|
|
|
|
.NOTES
|
|
|
|
Author: Dark Master | License: CC0-1,0
|
|
|
|
#>
|
|
|
|
|
|
|
|
try {
|
|
|
|
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
|
|
|
|
|
|
|
$Path = $env:TEMP;
|
|
|
|
$Installer = "chrome_installer.exe"
|
|
|
|
Invoke-WebRequest "https://cdn.stubdownloader.services.mozilla.com/builds/firefox-stub/en-US/win/c0c2728dec93a47f981393e20cb0793bafd3a455e152118836bde89b2f02b614/Firefox%20Installer.exe" -OutFile $Path\$Installer
|
|
|
|
Start-Process -FilePath $Path\$Installer -Args "/silent /install" -Verb RunAs -Wait
|
|
|
|
Remove-Item $Path\$Installer
|
|
|
|
|
|
|
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
|
|
|
"installed Firefox in $Elapsed sec"
|
|
|
|
exit 0 # successfully installed firefox
|
|
|
|
} catch {
|
|
|
|
"Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2024-11-20 11:52:20 +01:00
|
|
|
*(generated by convert-ps2md.ps1 as of 11/20/2024 11:51:53)*
|