AnyConnect installer fixes + WinGet AllUsers
This commit is contained in:
@@ -26,10 +26,20 @@ Function CheckInstall {
|
||||
if ((CheckInstall) -eq $false) {
|
||||
try {
|
||||
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) {
|
||||
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 {
|
||||
write-host "it no worky"
|
||||
|
Reference in New Issue
Block a user