geenforce: broaden kiosk startup sweep to catch imaging-installer launchers
This commit is contained in:
@@ -156,7 +156,13 @@ Get-ChildItem -LiteralPath $startup -Filter '*.lnk' -ErrorAction SilentlyContinu
|
||||
else {{
|
||||
try {{
|
||||
$existing = $shell.CreateShortcut($_.FullName)
|
||||
if ($existing.TargetPath -match 'msedge\\.exe$' -and $existing.Arguments -match '--kiosk') {{ $drop = $true }}
|
||||
$isBrowser = $existing.TargetPath -match '(?i)(msedge|chrome)\\.exe$'
|
||||
# -kiosk matches both '-kiosk' and '--kiosk'. Also catch any browser
|
||||
# shortcut pointing at a shopdb kiosk URL (incl. the dead
|
||||
# shopfloor-dashboard route + --app variants).
|
||||
$kioskArgs = ($existing.Arguments -match '(?i)-kiosk') -or `
|
||||
($existing.Arguments -match '(?i)tsgwp00525|/shopdb/|shopfloor-dashboard')
|
||||
if ($isBrowser -and $kioskArgs) {{ $drop = $true }}
|
||||
}} catch {{}}
|
||||
}}
|
||||
if ($drop) {{ Remove-Item -LiteralPath $_.FullName -Force -ErrorAction SilentlyContinue }}
|
||||
|
||||
Reference in New Issue
Block a user