diff --git a/automatic/nmap/tools/chocolateyInstall.ps1 b/automatic/nmap/tools/chocolateyInstall.ps1 index 9ff5fd663b9..24cae88242e 100644 --- a/automatic/nmap/tools/chocolateyInstall.ps1 +++ b/automatic/nmap/tools/chocolateyInstall.ps1 @@ -5,4 +5,4 @@ $toolsPath = Split-Path $MyInvocation.MyCommand.Definition $file = "$toolsPath\nmap-7.92-setup.exe" Start-Process -Wait $toolsPath\install.ahk $file -ls $toolsPath\*.exe | % { rm $_ -ea 0; if (Test-Path $_) { sc "$_.ignore" "" }} +Get-ChildItem $toolsPath\*.exe | ForEach-Object { Remove-Item $_ -ea 0; if (Test-Path $_) { Set-Content "$_.ignore" "" }}