欧博abgSecurity Warning" in Windows 11?
I have managed to find a solution, to get rid of "Open File - Security Warning" for all files of specific extensions, one can use Local Group Policy Editor to do it.
Here is how:
Press Win + R, type gpedit.msc, press Enter
Navigate to "User Configuration" -> "Administrative Templates" -> "Windows Components" -> "Attachment Manager".
In the right panel, double click "Inclusion list for low file types", toggle "Enabled", and in the lower left "specify low risk extensions" lineedit, type a semi-colon separated list of extensions for which you want to get rid of "Open File - Security Warning", in this example, using .exe should disable aforementioned prompt for all executable files, click "Apply", then click "OK".
And that gets rid of all "Open File - Security Warning" prompts for all listed extensions. I use .bat;.exe;.js;.ps1;.py and it works perfectly.
However it seems editing the registry key this setting affects directly is insufficient to disable the warning prompt, I have set the policy to disabled then not configured and tried to edit the registry directly, which didn't give the intended result:
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Associations" -ErrorAction SilentlyContinue > $Null Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Associations" -Name "LowRiskFileTypes" -Type String -Value ".bat;.exe;.js;.ps1;.py"I even edited the group policy object registry key and it also didn't work:
$nodes = @( "Group Policy Objects", "{3F6C457C-9238-4EFE-A7A5-0B4D980838F3}User", "Software", "Microsoft", "Windows", "CurrentVersion", "Policies", "Associations" ) 0..7 | ForEach-Object { New-Item -Path ("HKCU:\Software\Microsoft\Windows\CurrentVersion\" + ($nodes[0..$_] -join "\")) -ErrorAction SilentlyContinue > $null } Set-ItemProperty -Path ("HKCU:\Software\Microsoft\Windows\CurrentVersion\" + ($nodes -join "\")) -Name "LowRiskFileTypes" -Type String -Value ".bat;.exe;.js;.ps1;.py"Thus this method only works by going through the GUI process.
I have used procmon64.exe and set the filter to include "mmc.exe" process and "RegSetValue" operation and I have identified that the policy also effects another registry key:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Notifications\Data\418A073AA3BC3475But its data type is REG_BINARY and I have no idea what is inside, what does this operation modify, though it seems evident that the real solution would be to directly modify this key.