AnyConnect installer fixes + WinGet AllUsers
This commit is contained in:
@@ -26,10 +26,20 @@ Function CheckInstall {
|
|||||||
if ((CheckInstall) -eq $false) {
|
if ((CheckInstall) -eq $false) {
|
||||||
try {
|
try {
|
||||||
Write-Host -ForegroundColor Yellow "Installing AnyConnect Core"
|
Write-Host -ForegroundColor Yellow "Installing AnyConnect Core"
|
||||||
msiexec /i ".\CiscoAnyConnect.msi" /quiet /norestart
|
$Installer = Start-Process msiexec -Wait -PassThru -ArgumentList "/i CiscoAnyConnect.msi /quiet /norestart"
|
||||||
|
if (0 -in $Installer.ExitCode) {
|
||||||
|
Write-Host -ForegroundColor Green "Successfully installed!"
|
||||||
|
} else {
|
||||||
|
Write-Host -ForegroundColor Red "AnyConnect returned error code" $Installer.ExitCode
|
||||||
|
}
|
||||||
if ($SBL) {
|
if ($SBL) {
|
||||||
Write-Host -ForegroundColor Yellow "Installing AnyConnect SBL"
|
Write-Host -ForegroundColor Yellow "Installing AnyConnect SBL"
|
||||||
msiexec /i ".\CiscoAnyConnectSBL.msi" /quiet /norestart
|
$Installer = Start-Process msiexec -Wait -PassThru -ArgumentList "/i CiscoAnyConnectSBL.msi /quiet /norestart"
|
||||||
|
if (0 -in $Installer.ExitCode) {
|
||||||
|
Write-Host -ForegroundColor Green "Successfully installed!"
|
||||||
|
} else {
|
||||||
|
Write-Host -ForegroundColor Red "AnyConnect returned error code" $Installer.ExitCode
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
write-host "it no worky"
|
write-host "it no worky"
|
||||||
|
@@ -56,7 +56,8 @@ Function ImportPSWinGet {
|
|||||||
Function Install-WinGet {
|
Function Install-WinGet {
|
||||||
if (ImportPSWinGet){
|
if (ImportPSWinGet){
|
||||||
try {
|
try {
|
||||||
repair-wingetpackagemanager
|
repair-wingetpackagemanager -AllUsers -Force
|
||||||
|
#Requires -RunAsAdministrator
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host -ForegroundColor Red "Couldn't repair/install WinGet"
|
Write-Host -ForegroundColor Red "Couldn't repair/install WinGet"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user