mirror of
https://git.steelants.cz/JonatanRek/INT_PKG_BUILDER.git
synced 2026-10-11 13:45:32 +00:00
Fix Uninstaller
This commit is contained in:
1 parent
f80333d14b
commit
85c9e3a24d
1 file changed
+8
-2
@@ -1,10 +1,16 @@
|
|||||||
|
$PathIntune = "$Env:Programfiles\itego\intune"
|
||||||
|
Start-Transcript -Path "$PathIntune\Log\FortigateVPN-uninstall.log" -Force
|
||||||
|
|
||||||
# array of uninstall args
|
# array of uninstall args
|
||||||
$uninstallArgs = "/uninstall"," ","/quiet", "/norestart"
|
$uninstallArgs = "/uninstall"," ","/quiet", "/norestart"
|
||||||
$dotnetVersions = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "FortiClient VPN*" }
|
$dotnetVersions = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "FortiClient VPN" }
|
||||||
|
|
||||||
foreach ($version in $dotnetVersions) {
|
foreach ($version in $dotnetVersions) {
|
||||||
# update array index 1 with version id
|
# update array index 1 with version id
|
||||||
$uninstallArgs[1] = '"' + $version.IdentifyingNumber + '"'
|
$uninstallArgs[1] = '"' + $version.IdentifyingNumber + '"'
|
||||||
Write-Host "Uninstalling $($version.Name) ($($version.Version))... $("$uninstallArgs")"
|
Write-Host "Uninstalling $($version.Name) ($($version.Version))... $("$uninstallArgs")"
|
||||||
Start-Process -FilePath "msiexec.exe" -ArgumentList "$uninstallArgs" -Wait
|
Start-Process -FilePath "msiexec.exe" -ArgumentList "$uninstallArgs" -Wait
|
||||||
}
|
}
|
||||||
|
0
|
||||||
|
|
||||||
|
Stop-Transcript
|
||||||
Reference in new issue
Block a user