I'm on Windows 10 Build 2004 and I noticed that the Windows Defender Smartscreen process is running even though I have disabled it from the Settings and via Group Policy Editor. So I ran these commands but the third command gives me the following error: 1) takeown /f "%systemroot%\System32\smartscreen.exe" /a 2) icacls "%systemroot%\System32\smartscreen.exe" /reset 3) nsudoc -U:T -P:E "%systemroot%\System32\icacls.exe" %systemroot%\System32\smartscreen.exe /inheritance:r /remove *S-1-5-32-544 *S-1-5-11 *S-1-5-32-545 *S-1-5-18 What am I doing here? I tried searching the entire system for a file named nsudoc and I couldn't find it perhaps that's why it's throwing that error? Even by running the first 2 commands, the process is sitll running in the background.
The way you've written the code, nsudoc.exe has to be in the same folder as the script, or in the path, and it's not. Get it here. Also in line 3 you're missing quotes in the smartscreen path: nsudoc -U:T -P:E "%systemroot%\System32\icacls.exe" "%systemroot%\System32\smartscreen.exe" /inheritance:r /remove *S-1-5-32-544 *S-1-5-11 *S-1-5-32-545 *S-1-5-18
Sorry I just saw your reply but thanks a lot. nsudoc.exe is not in the latest version 8.0 I just checked. I don't know which one of those files I need: While I was searching today I found another way to disable it and that worked. Code: reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /t REG_SZ /d "Off" /f reg add "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\PhishingFilter" /v "EnabledV9" /t REG_DWORD /d "0" /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\AppHost" /v "EnableWebContentEvaluation" /t "REG_DWORD" /d "0" /f reg add "HKLM\Software\Policies\Microsoft\Windows\System" /v "EnableSmartScreen" /t "REG_DWORD" /d "0" /f reg add "HKLM\Software\Policies\Microsoft\Windows Defender\SmartScreen" /v "ConfigureAppInstallControl" /t REG_SZ /d "Anywhere" /f reg add "HKLM\Software\Policies\Microsoft\Windows Defender\SmartScreen" /v "ConfigureAppInstallControlEnabled" /t "REG_DWORD" /d "0" /f takeown /s %computername% /u %username% /f "%WinDir%\System32\smartscreen.exe" icacls "%WinDir%\System32\smartscreen.exe" /grant:r %username%:F taskkill /im smartscreen.exe /f del "%WinDir%\System32\smartscreen.exe" /s /f /q