2023-07-18 17:09:12 +00:00
|
|
|
#!/bin/pwsh
|
2023-07-18 18:28:46 +00:00
|
|
|
param($context);
|
|
|
|
|
2024-08-07 19:05:32 +00:00
|
|
|
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
|
2023-07-18 18:28:46 +00:00
|
|
|
[Context] $context = $context;
|
|
|
|
|
2023-07-18 18:26:27 +00:00
|
|
|
Write-Host "Installing UniFi Controller";
|
|
|
|
Write-Information "Downgrading AutoHotkey";
|
2023-07-18 17:09:12 +00:00
|
|
|
$ahkID = "AutoHotkey.AutoHotkey";
|
2023-07-18 17:13:11 +00:00
|
|
|
winget uninstall --accept-source-agreements -e --id "$ahkID";
|
2023-07-18 17:39:31 +00:00
|
|
|
winget install --accept-source-agreements --accept-package-agreements -e --id "$ahkID" --version "1.1.37.00";
|
2023-07-18 18:26:27 +00:00
|
|
|
|
|
|
|
Write-Information "Installing JRE... eww...";
|
2023-07-18 17:09:12 +00:00
|
|
|
choco install -y temurin11jre;
|
2023-07-18 18:26:27 +00:00
|
|
|
|
|
|
|
Write-Information "Installing UniFi Controller";
|
2023-07-18 17:47:51 +00:00
|
|
|
choco install -y ubiquiti-unifi-controller --ignore-dependencies;
|
2023-07-18 18:26:27 +00:00
|
|
|
|
|
|
|
Write-Information "Upgrading AutoHotkey";
|
2023-07-18 17:35:55 +00:00
|
|
|
winget uninstall --accept-source-agreements -e --id "$ahkID";
|
2023-07-18 17:09:12 +00:00
|
|
|
winget install --accept-source-agreements --accept-package-agreements -e --id "$ahkID";
|
2023-07-18 18:28:46 +00:00
|
|
|
|
|
|
|
Write-Information "Removing desktop icon";
|
|
|
|
$context.RemoveDesktopIcon("UniFi*");
|