added comments and uninstaller for Windows Software Probe
This commit is contained in:
@@ -1,33 +1,52 @@
|
|||||||
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform\PME\unins000.exe" ) {
|
## Remove N-Central Patch Management Service Controller
|
||||||
|
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform\PME\unins000.exe" ) {
|
||||||
LogMsg "Uninstalling N-Central Patch Management Service Controller"
|
LogMsg "Uninstalling N-Central Patch Management Service Controller"
|
||||||
Try { Start-Process "${Env:ProgramFiles(x86)}\MspPlatform\PME\unins000.exe" -ArgumentList "/SILENT" -Wait }
|
Try { Start-Process "${Env:ProgramFiles(x86)}\MspPlatform\PME\unins000.exe" -ArgumentList "/SILENT" -Wait }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## Remove N-Central File Cache Service Agent
|
||||||
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform\FileCacheServiceAgent\unins000.exe" ) {
|
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform\FileCacheServiceAgent\unins000.exe" ) {
|
||||||
LogMsg "Uninstalling N-Central File Cache Service Agent"
|
LogMsg "Uninstalling N-Central File Cache Service Agent"
|
||||||
Try { Start-Process "${Env:ProgramFiles(x86)}\MspPlatform\FileCacheServiceAgent\unins000.exe" -ArgumentList "/SILENT" -Wait }
|
Try { Start-Process "${Env:ProgramFiles(x86)}\MspPlatform\FileCacheServiceAgent\unins000.exe" -ArgumentList "/SILENT" -Wait }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## Remove N-Central Request Handler Agent
|
||||||
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform\RequestHandlerAgent\unins000.exe" ) {
|
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform\RequestHandlerAgent\unins000.exe" ) {
|
||||||
LogMsg "Uninstalling N-Central Request Handler Agent"
|
LogMsg "Uninstalling N-Central Request Handler Agent"
|
||||||
Try { Start-Process "${Env:ProgramFiles(x86)}\MspPlatform\RequestHandlerAgent\unins000.exe" -ArgumentList "/SILENT" -Wait }
|
Try { Start-Process "${Env:ProgramFiles(x86)}\MspPlatform\RequestHandlerAgent\unins000.exe" -ArgumentList "/SILENT" -Wait }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## Remove Windows Software Probe
|
||||||
|
If ( Test-Path "${ProgramFiles(x86)}\N-able Technologies\Windows Software Probe\bin\wsp.exe" ) {
|
||||||
|
$ProductCode = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\N-able Technologies\Windows Software Probe").ProductCode
|
||||||
|
LogMsg "Uninstalling Windows Software Probe"
|
||||||
|
Try { Start-Process "msiexec.exe" -ArgumentList "/X {${ProductCode}} /qn" -Wait }
|
||||||
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
}
|
||||||
|
|
||||||
|
## Remove "MspPlatform" directory
|
||||||
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform" ) {
|
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform" ) {
|
||||||
LogMsg "Forcefully removing ""${Env:ProgramFiles(x86)}\MspPlatform"""
|
LogMsg "Forcefully removing ""${Env:ProgramFiles(x86)}\MspPlatform"""
|
||||||
Try { Remove-Item "${Env:ProgramFiles(x86)}\MspPlatform" -Recurse -Force }
|
Try { Remove-Item "${Env:ProgramFiles(x86)}\MspPlatform" -Recurse -Force }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
}
|
}
|
||||||
|
|
||||||
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform" ) {
|
## Remove "N-able Technologies" directory
|
||||||
|
If ( Test-Path "${Env:ProgramFiles(x86)}\N-able Technologies" ) {
|
||||||
LogMsg "Forcefully removing ""${Env:ProgramFiles(x86)}\N-able Technologies"""
|
LogMsg "Forcefully removing ""${Env:ProgramFiles(x86)}\N-able Technologies"""
|
||||||
Try { Remove-Item "${Env:ProgramFiles(x86)}\N-able Technologies" -Recurse -Force }
|
Try { Remove-Item "${Env:ProgramFiles(x86)}\N-able Technologies" -Recurse -Force }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## Remove "N-able Technologies" registry key
|
||||||
|
If ( Test-Path "HKLM:SOFTWARE\Wow6432Node\N-able Technologies" ) {
|
||||||
|
LogMsg "Forcefully removing ""HKLM:SOFTWARE\Wow6432Node\N-able Technologies"""
|
||||||
|
Try { Remove-Item "HKLM:SOFTWARE\Wow6432Node\N-able Technologies" -Recurse -Force }
|
||||||
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
}
|
||||||
If ( Test-Path "HKLM:SOFTWARE\N-able Technologies" ) {
|
If ( Test-Path "HKLM:SOFTWARE\N-able Technologies" ) {
|
||||||
LogMsg "Forcefully removing ""HKLM:SOFTWARE\N-able Technologies"""
|
LogMsg "Forcefully removing ""HKLM:SOFTWARE\N-able Technologies"""
|
||||||
Try { Remove-Item "HKLM:SOFTWARE\N-able Technologies" -Recurse -Force }
|
Try { Remove-Item "HKLM:SOFTWARE\N-able Technologies" -Recurse -Force }
|
||||||
|
|||||||
Reference in New Issue
Block a user