cleanup after finished (Fix-AutodeskProductLicensing.ps1)
add service installation (Install-Wireguard.ps1)
This commit is contained in:
@@ -16,4 +16,16 @@ If ( Test-Path $ALST ) {
|
|||||||
LogMsg "Resetting all Autodesk product licenses to named-user licenses"
|
LogMsg "Resetting all Autodesk product licenses to named-user licenses"
|
||||||
Try { Start-Process $ALST -ArgumentList '-r ALL:USER' -Wait }
|
Try { Start-Process $ALST -ArgumentList '-r ALL:USER' -Wait }
|
||||||
Catch { LogErr $_.Exception.Message }
|
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 }
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,11 @@ If ( IsAdmin )
|
|||||||
Else { $URL = 'https://download.wireguard.com/windows-client/wireguard-x86-latest.msi' }
|
Else { $URL = 'https://download.wireguard.com/windows-client/wireguard-x86-latest.msi' }
|
||||||
|
|
||||||
## Install package
|
## 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 }
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
## Create shortcut on Public desktop
|
## Create shortcut on Public desktop
|
||||||
|
|||||||
Reference in New Issue
Block a user