cleanup after finished (Fix-AutodeskProductLicensing.ps1)

add service installation (Install-Wireguard.ps1)
This commit is contained in:
2020-12-23 08:16:37 -05:00
parent 226b87b465
commit ae42120f1f
2 changed files with 17 additions and 1 deletions
+12
View File
@@ -16,4 +16,16 @@ If ( Test-Path $ALST ) {
LogMsg "Resetting all Autodesk product licenses to named-user licenses"
Try { Start-Process $ALST -ArgumentList '-r ALL:USER' -Wait }
Catch { LogErr $_.Exception.Message }
}
If ( Test-Path $LicensingSupportTool ) {
LogMsg "Deleting ""${LicensingSupportTool}"""
Try { Remove-Item $LicensingSupportTool -Force -ErrorAction SilentlyContinue }
Catch { LogErr $_.Exception.Message }
}
If ( Test-Path $WorkingDir ) {
LogMsg "Deleting ""${WorkingDir}"""
Try { Remove-Item $WorkingDir -Recurse -Force -ErrorAction SilentlyContinue }
Catch { LogErr $_.Exception.Message }
}
+5 -1
View File
@@ -8,7 +8,11 @@ If ( IsAdmin )
Else { $URL = 'https://download.wireguard.com/windows-client/wireguard-x86-latest.msi' }
## Install package
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${URL} /qn /norestart DO_NOT_LAUNCH=1" -Wait }
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${URL} /qn /norestart DO_NOT_LAUNCH=1" -Wait -ErrorAction Stop }
Catch { LogErr $_.Exception.Message ; Exit }
## Install manager service
Try { Start-Process "wireguard.exe" -ArgumentList '/installmanagerservice' -Wait -ErrorAction SilentlyContinue }
Catch { LogErr $_.Exception.Message }
## Create shortcut on Public desktop