File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -382,11 +382,11 @@ process {
382382 $UninstallerPath = $null
383383 switch ($UninstallTool ) {
384384 ' installcache' {
385- $UninstallerName = ' WindowsSensor*.exe'
385+ $UninstallerName = ' ( WindowsSensor*.exe|FalconSensor_Windows*.exe) '
386386 $UninstallerPathDir = ' C:\ProgramData\Package Cache'
387387
388388 if (Test-Path - Path $UninstallerPathDir ) {
389- $UninstallerPath = Get-ChildItem - Include $UninstallerName - Path $UninstallerPathDir - Recurse | ForEach-Object { $_.FullName } | Sort-Object - Descending | Select-Object - First 1
389+ $UninstallerPath = Get-ChildItem - Path $UninstallerPathDir - Recurse | Where-Object { $_ .Name -match $UninstallerName } | ForEach-Object { $_.FullName } | Sort-Object - Descending | Select-Object - First 1
390390 } else {
391391 $UninstallerPath = $null
392392 }
You can’t perform that action at this time.
0 commit comments