Hi guys, I need help for a small script again . getting ambitious hehe The script re-enable inheritence on key locked by WFC, allowing to disable firewall, then check for windows updates, then ask the user to re-set protection when he wants (secure profile+firewall ON). As usual, using Nsudo (and Abodi's technique to launch Nsudo) Code: @echo off cd %systemroot%\system32 call :IsAdmin %windir%\system32\reg.exe query "HKU\S-1-5-19" 1>nul 2>nul || goto :eof %windir%\system32\whoami.exe /USER | find /i "S-1-5-18" 1>nul && ( goto :OK ) || ( "Nsudo" -U:T -P:E "%~dpnx0" goto :eof ) :OK @echo off SetACL -on "HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile" -ot reg -actn setprot -op "dacl:np" -actn clear -clr "dacl" -actn rstchldrn -rst "dacl" netsh advfirewall set currentprofile state off explorer /root, ms-settings:windowsupdate-action @echo Click on any key to re-enable secure profile now. @pause>nul netsh advfirewall set currentprofile state on SetACL -on "HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile" -ot reg -actn setprot -op "dacl:p_nc" -actn clear -clr "dacl" -actn ace -ace "n:SYSTEM;p:full" -ace "n:NT SERVICE\mpssvc;p:read" cmd/c Exit :IsAdmin Reg.exe query "HKU\S-1-5-19\Environment" If Not %ERRORLEVEL% EQU 0 ( Cls & echo You must have administrator rights to continue. echo Press any key to exit... pause >nul ) Cls goto:eof Most difficult was to find the set-acl mecanisms after finding WFC lock method, and I was doing everything in PS when I discovered set acl is also a cmdline tool... no more powershell -command" in script, no more p:full expression missing/not exist error, and script is way faster. Last thing I'd like now, is to hide the first commands...the one after : OK are visible. Processing ACL of: ... SetACL finished successfully... OK Even tried to add another @echo off in front but that didn't work... I'd would like to see only the "Click on any key to re-enable..." when running the script. and show "success" before closing window, if possible. Ps: Another example of how 1809 is not quite finished, when you update this way (ms-settings:windowsupdate-action) the rectangle outline of the Home in "Windows Update" is highlighted in black...it really looks like a GUI glitch.