SimCity 4 Deluxe

SimCity 4 Deluxe

Generic DirectX Compatibility Fix For Sim City 4 On Windows 10 / 11
NOTE: On Windows 10 / 11: Right-click on the following batch files after saving them, and click "Run as administrator".


  1. Use Notepad to create this file on your desktop or another folder: Win10_11_DirectX_SecuROM7_App_Compatibility_Fix.bat


    @ECHO OFF SETLOCAL IF [%1]==[] GOTO DXAPP_COMPAT_FX_LST_LNE_ IF NOT %1==BYPASS GOTO DXAPP_COMPAT_FX_SRT_LBL_1_ IF [%2]==[] GOTO DXAPP_COMPAT_FX_LST_LNE_ IF [%3]==[] GOTO DXAPP_COMPAT_FX_SRT_LBL_0_ FOR %%A IN (%*) DO (IF EXIST %%A (IF /I [%%~xA]==[.EXE] ((REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V %%A /F)&(REG DELETE "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V %%A /F)&(REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V %%A /T REG_SZ /D "~ WinXPRTMVersionLie 8And16BitAggregateBlts 8And16BitGDIRedraw AccelGdipFlush AoaMp4Converter CorrectCreateBrushIndirectHatch CustomNCRender DirectXVersionLie 9.0.c DetectorDWM8And16Bit DisableFadeAnimations DisableThemeMenus DXGICompat DWM8And16BitMitigation DXMaximizedWindowedMode FailObsoleteShellAPIs FakeLunaTheme FreestyleBMX GlobalMemoryStatusLie IgnoreAltTab IgnoreDirectoryJunction IgnoreFontQuality LoadLibraryRedirect ManageLinks RedirectMP3Codec SecuROM7 SharePointDesigner2007 Sonique2 TextArt TrimDisplayDeviceNames VirtualizeDesktopPainting WaveOutIgnoreBadFormat XPAfxIsValidAddress" /F)&(REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V %%A /T REG_SZ /D "~ WIN7RTM" /F))) >nul 2>&1) GOTO DXAPP_COMPAT_FX_LST_LNE_ :DXAPP_COMPAT_FX_SRT_LBL_0_ (IF NOT EXIST %2 GOTO DXAPP_COMPAT_FX_LST_LNE_) (IF /I NOT [%~x2]==[.EXE] GOTO DXAPP_COMPAT_FX_LST_LNE_) (SET DXAPPCOMPAT_FX_SRTVAR_=%2) GOTO DXAPP_COMPAT_FX_SRT_LBL_2_ :DXAPP_COMPAT_FX_SRT_LBL_1_ (IF NOT EXIST %1 GOTO DXAPP_COMPAT_FX_LST_LNE_) (IF /I NOT [%~x1]==[.EXE] GOTO DXAPP_COMPAT_FX_LST_LNE_) (SET DXAPPCOMPAT_FX_SRTVAR_=%1) :DXAPP_COMPAT_FX_SRT_LBL_2_ (((REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V %DXAPPCOMPAT_FX_SRTVAR_% /F)&(REG DELETE "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V %DXAPPCOMPAT_FX_SRTVAR_% /F)&(REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V %DXAPPCOMPAT_FX_SRTVAR_% /T REG_SZ /D "~ WinXPRTMVersionLie 8And16BitAggregateBlts 8And16BitGDIRedraw AccelGdipFlush AoaMp4Converter CorrectCreateBrushIndirectHatch CustomNCRender DirectXVersionLie 9.0.c DetectorDWM8And16Bit DisableFadeAnimations DisableThemeMenus DXGICompat DWM8And16BitMitigation DXMaximizedWindowedMode FailObsoleteShellAPIs FakeLunaTheme FreestyleBMX GlobalMemoryStatusLie IgnoreAltTab IgnoreDirectoryJunction IgnoreFontQuality LoadLibraryRedirect ManageLinks RedirectMP3Codec SecuROM7 SharePointDesigner2007 Sonique2 TextArt TrimDisplayDeviceNames VirtualizeDesktopPainting WaveOutIgnoreBadFormat XPAfxIsValidAddress" /F)&(REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V %DXAPPCOMPAT_FX_SRTVAR_% /T REG_SZ /D "~ WIN7RTM" /F)) >nul 2>&1) IF %1==BYPASS GOTO DXAPP_COMPAT_FX_LST_LNE_ CLS ECHO ...Compatibility Settings For The Following Application Were Added For All Users: ECHO: ECHO %1... ECHO: ECHO [Enabled:] Display Scaling On High DPI Settings ECHO [Enabled:] Legacy DirectX Compatibility Fixes: WinXPRTMVersionLie 8And16BitAggregateBlts 8And16BitGDIRedraw AccelGdipFlush AoaMp4Converter CorrectCreateBrushIndirectHatch CustomNCRender DirectXVersionLie 9.0.c DetectorDWM8And16Bit DisableFadeAnimations DisableThemeMenus DXGICompat DWM8And16BitMitigation DXMaximizedWindowedMode FailObsoleteShellAPIs FakeLunaTheme FreestyleBMX GlobalMemoryStatusLie IgnoreAltTab IgnoreDirectoryJunction IgnoreFontQuality LoadLibraryRedirect ManageLinks RedirectMP3Codec SecuROM7 SharePointDesigner2007 Sonique2 TextArt TrimDisplayDeviceNames VirtualizeDesktopPainting WaveOutIgnoreBadFormat XPAfxIsValidAddress ECHO: PAUSE :DXAPP_COMPAT_FX_LST_LNE_ ENDLOCAL MOVE NUL 2>&0


    SIDE NOTE: If you put BYPASS in front of the first batch file, it will create an operating system compatibility profile for the game executable file(s), unattended in the background:


    CMD /Q /C START /MIN /REALTIME %UserProfile%\Desktop\Win10_11_DirectX_SecuROM7_App_Compatibility_Fix.bat BYPASS "<insert_path_to_game_executable_file_1>" "<insert_path_to_game_executable_file_2>" "<insert_path_to_game_executable_file_3>" Alternate: CMD /Q /C START /MIN /REALTIME /WAIT /B %UserProfile%\Desktop\Win10_11_DirectX_SecuROM7_App_Compatibility_Fix.bat BYPASS "<insert_path_to_game_executable_file_1>" "<insert_path_to_game_executable_file_2>" "<insert_path_to_game_executable_file_3>"


    Open the Command Prompt:
    Windows 11: Start Menu -> Right-Click -> Run -> taskmgr -> Click OK. -> Run new task ( Top-Right Corner Of Task Manager ) -> %SystemRoot%\System32\cmd.exe -> Enable Checkbox: "Create this task with administrative privileges." -> Click OK. Windows 10: Start Menu -> Right-Click -> Run -> taskmgr -> Click OK. -> File -> Run new task -> %SystemRoot%\System32\cmd.exe -> Enable Checkbox: "Create this task with administrative privileges." -> Click OK.


    Alternate: Run the Script Above From an Elevated Command Prompt, Using an Install Folder Layout Relative to the Example Below:
    "%UserProfile%\Desktop\Win10_11_DirectX_SecuROM7_App_Compatibility_Fix.bat" BYPASS "D:\Steam\steamapps\common\Seven Kingdoms 2 HD\7K2.exe"


    NOTE: The following batch files can be used to create a secure set of Windows Defender Firewall Rules on Windows 10 / 11, for the Steam Launcher Application, and any applications located within a subdirectory, or the root directory of the Default Installation Folder path:


  2. Use Notepad to create this file on your desktop or another folder: Configure_Win10_11_Firewall.bat


    @ECHO OFF SETLOCAL EnableDelayedExpansion CD /D "%~dp0" ((IF %Processor_Architecture%==ARM64 SET ARCH_WDTH_WIN_=_*_Arm64__*)&(IF %Processor_Architecture%==AMD64 SET ARCH_WDTH_WIN_=_*_x64__*)&(IF %Processor_Architecture%==x86 SET ARCH_WDTH_WIN_=_*_x86__*)) SET ALS_FrWll_STRT=App Updater IF [%1]==[] GOTO CNFG_FRWLL_SKP_RST_LBL IF NOT ["%1"]==["RESET"] GOTO CNFG_FRWLL_SKP_RST_LBL ((netsh advfirewall reset)&(CMD /Q /C START /MIN /REALTIME PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Get-NetAdapter -Name 'v* (Default Switch)' -IncludeHidden | Disable-NetAdapter -Confirm:$False;Get-HNSNetwork | Remove-HNSNetwork;Get-NetFirewallRule -Direction Inbound -Enabled True | where DisplayName -eq 'HNS Container Networking*' | Remove-NetFirewallRule}")&(CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Set-NetFirewallSetting -PolicyStore PersistentStore;Set-NetFirewallProfile -PolicyStore PersistentStore -Profile Domain, Private, Public;Get-NetFirewallProfile | Set-NetFirewallProfile -AllowUnicastResponseToMulticast False -DefaultInboundAction Block -DefaultOutboundAction Block -Enabled True -EnableStealthModeForIPsec True -LogAllowed False -LogBlocked False -LogIgnored False -NotifyOnListen True}")&(CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Get-NetFirewallRule -Enabled True | Disable-NetFirewallRule}")) :CNFG_FRWLL_SKP_RST_LBL PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {'App Updater *','DNSCrypt Client Proxy','NordVPN*','Firefox Portable','Thorium Portable*','Vivaldi Portable','Vivaldi Portable (Updater)' | ForEach-Object -Process {Get-NetFirewallRule | where DisplayName -cLike $_ | Remove-NetFirewallRule}}" IF EXIST "C:\Windows\System32\curl.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater Essential ( cURL - System32 )' -Profile Any -Program 'C:\Windows\System32\curl.exe' -Protocol Any}" IF EXIST "C:\Windows\SysWOW64\curl.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater Essential ( cURL - SysWOW64 )' -Profile Any -Program 'C:\Windows\SysWOW64\curl.exe' -Protocol Any}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater Essential ( Windows Time Service )' -Profile Any -InterfaceType Any -Protocol UDP -LocalPort 123 -RemotePort Any -Service W32Time}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater Essential ( W32tm )' -Profile Any -InterfaceType Any -Program 'C:\Windows\System32\w32tm.exe' -Protocol UDP -LocalPort 123 -RemotePort Any}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater Essential ( DHCP Client TX )' -Profile Any -Protocol UDP -LocalPort Any -RemotePort 53,5353,443,67,68,2535 -InterfaceType Any -Service Dhcp}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater Essential ( DHCP Client RX )' -Profile Any -Protocol UDP -LocalPort 53,5353,443,67,68,2535 -RemotePort Any -InterfaceType Any -Service Dhcp}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater Essential ( DNS Client TX )' -Profile Any -Protocol UDP -LocalPort Any -RemotePort 53,5353,443,67,68,2535 -InterfaceType Any -Service Dnscache}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater Essential ( DNS Client RX )' -Profile Any -Protocol UDP -LocalPort 53,5353,443,67,68,2535 -RemotePort Any -InterfaceType Any -Service Dnscache}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Inbound -DisplayName 'App Updater Essential ( IKE and AuthIP IPsec Keying Modules - RX )' -Profile Any -Protocol UDP -LocalPort 500,4500 -RemotePort 500,4500 -InterfaceType Any -Service IKEEXT}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater Essential ( IKE and AuthIP IPsec Keying Modules - TX )' -Profile Any -Protocol UDP -LocalPort 500,4500 -RemotePort 500,4500 -InterfaceType Any -Service IKEEXT}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Background Intelligent Transfer Service )' -Enabled False -Profile Any -Protocol Any -Service BITS}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Cryptographic Services )' -Enabled False -Profile Any -Protocol Any -Service CryptSvc}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Delivery Optimization )' -Enabled False -Profile Any -Protocol Any -Service DoSvc}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Device Setup Manager )' -Enabled False -Profile Any -Protocol Any -Service DsmSvc}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Windows Update )' -Enabled False -Profile Any -Protocol Any -Service wuauserv}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Update Orchestrator Service )' -Enabled False -Profile Any -Protocol Any -Service UsoSvc}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( AppX Deployment Service )' -Enabled False -Profile Any -Protocol Any -Service AppXSvc}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Microsoft Store Install Service )' -Enabled False -Profile Any -Protocol Any -Service InstallService}" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Windows License Manager Service )' -Enabled False -Profile Any -Protocol Any -Service LicenseManager}" IF EXIST "C:\Windows\System32\Fondue.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Windows Features on Demand UX )' -Enabled False -Profile Any -Program 'C:\Windows\System32\Fondue.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\OptionalFeatures.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Windows Features )' -Enabled False -Profile Any -Program 'C:\Windows\System32\OptionalFeatures.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\usocoreworker.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( USO Core Worker Process )' -Enabled False -Profile Any -Program 'C:\Windows\System32\usocoreworker.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\MoUsoCoreWorker.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( USO Core Worker Process )' -Enabled False -Profile Any -Program 'C:\Windows\System32\MoUsoCoreWorker.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\wuauclt.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( System32 - Windows Update )' -Enabled False -Profile Any -Program 'C:\Windows\System32\wuauclt.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\UsoClient.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( System32 - UsoClient )' -Enabled False -Profile Any -Program 'C:\Windows\System32\UsoClient.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\WWAHost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( WWA Host - System32 )' -Enabled False -Profile Any -Program 'C:\Windows\System32\WWAHost.exe' -Protocol Any}" IF EXIST "C:\Windows\SysWOW64\WWAHost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( WWA Host - SysWOW64 )' -Enabled False -Profile Any -Program 'C:\Windows\SysWOW64\WWAHost.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\wuapihost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( System32 - Windows Update API Host )' -Enabled False -Profile Any -Program 'C:\Windows\System32\wuapihost.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\oobe\UserOOBEBroker.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Windows Update - User OOBE Broker )' -Enabled False -Profile Any -Program 'C:\Windows\System32\oobe\UserOOBEBroker.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\LsaIso.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Credential Guard & VBS Key Isolation )' -Enabled False -Profile Any -Program 'C:\Windows\System32\LsaIso.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\sihost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Shell Infrastructure Host )' -Enabled False -Profile Any -Program 'C:\Windows\System32\sihost.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\SLUI.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Windows Activation Client )' -Enabled False -Profile Any -Program 'C:\Windows\System32\SLUI.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\wsl.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( System32 - WSL )' -Enabled False -Profile Any -Program 'C:\Windows\System32\wsl.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\wslconfig.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( System32 - WSL Configuration Tool )' -Enabled False -Profile Any -Program 'C:\Windows\System32\wslconfig.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\Dism.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Dism Image Servicing Utility - System32 )' -Enabled False -Profile Any -Program 'C:\Windows\System32\Dism.exe' -Protocol Any}" IF EXIST "C:\Windows\SysWOW64\Dism.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Dism Image Servicing Utility - SysWOW64 )' -Enabled False -Profile Any -Program 'C:\Windows\SysWOW64\Dism.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\Dism\DismHost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Dism Host Servicing Process - System32 )' -Enabled False -Profile Any -Program 'C:\Windows\System32\Dism\DismHost.exe' -Protocol Any}" IF EXIST "C:\Windows\SysWOW64\Dism\DismHost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Dism Host Servicing Process - SysWOW64 )' -Enabled False -Profile Any -Program 'C:\Windows\SysWOW64\Dism\DismHost.exe' -Protocol Any}" IF EXIST "C:\Windows\ImmersiveControlPanel\SystemSettings.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Settings )' -Enabled False -Profile Any -Program 'C:\Windows\ImmersiveControlPanel\SystemSettings.exe' -Protocol Any}" IF EXIST "C:\Windows\servicing\TrustedInstaller.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Windows Modules Installer )' -Enabled False -Profile Any -Program 'C:\Windows\servicing\TrustedInstaller.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Windows PowerShell - System32 )' -Enabled False -Profile Any -Program 'C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe' -Protocol Any}" IF EXIST "C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Windows PowerShell - SysWOW64 )' -Enabled False -Profile Any -Program 'C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\msiexec.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Windows Installer - System32 )' -Enabled False -Profile Any -Program 'C:\Windows\System32\msiexec.exe' -Protocol Any}" IF EXIST "C:\Windows\SysWOW64\msiexec.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Windows Installer - SysWOW64 )' -Enabled False -Profile Any -Program 'C:\Windows\SysWOW64\msiexec.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\lsass.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Local Security Authority Process - System32 )' -Enabled False -Profile Any -Program 'C:\Windows\System32\lsass.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\svchost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Host Process for Windows Services - System32 )' -Enabled False -Profile Any -Program 'C:\Windows\System32\svchost.exe' -Protocol Any}" IF EXIST "C:\Windows\SysWOW64\svchost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Host Process for Windows Services - SySWOW64 )' -Enabled False -Profile Any -Program 'C:\Windows\SysWOW64\svchost.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\browser_broker.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Browser Broker )' -Enabled False -Profile Any -Program 'C:\Windows\System32\browser_broker.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\BackgroundTransferHost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Download - Upload Host - System32 )' -Enabled False -Profile Any -Program 'C:\Windows\System32\BackgroundTransferHost.exe' -Protocol Any}" IF EXIST "C:\Windows\SysWOW64\BackgroundTransferHost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Download - Upload Host - SysWOW64 )' -Enabled False -Profile Any -Program 'C:\Windows\SysWOW64\BackgroundTransferHost.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\backgroundTaskHost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Background Task Host - System32 )' -Enabled False -Profile Any -Program 'C:\Windows\System32\backgroundTaskHost.exe' -Protocol Any}" IF EXIST "C:\Windows\SysWOW64\backgroundTaskHost.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( Background Task Host - SysWOW64 )' -Enabled False -Profile Any -Program 'C:\Windows\SysWOW64\backgroundTaskHost.exe' -Protocol Any}" IF EXIST "C:\Windows\System32\AppHostRegistrationVerifier.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'App Updater ( App Uri Handlers Registration Verifier )' -Enabled False -Profile Any -Program 'C:\Windows\System32\AppHostRegistrationVerifier.exe' -Protocol Any}" IF EXIST "%ProgramFiles%\dnscrypt-proxy\dnscrypt-proxy.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'DNSCrypt Client Proxy' -Profile Any -Program '%ProgramFiles%\dnscrypt-proxy\dnscrypt-proxy.exe' -Protocol Any}" (SET FRFX_CNTR_RNGVAR_=0) FOR /F "usebackq tokens=* delims=" %%A IN (`REG QUERY "HKCU\Software\Clients\StartMenuInternet" /S /D /F "FirefoxPortable" 2^> nul`) DO (((ECHO "%%A"| FINDSTR /LC:"ApplicationIcon") >nul 2>&1)&(IF !ErrorLevel! EQU 0 ((SET /A FRFX_CNTR_RNGVAR_+=1)&(SET FRFX_PRTBLE_FrWLL_RL_DFLT_VAR_=%%A)&(IF EXIST "!FRFX_PRTBLE_FrWLL_RL_DFLT_VAR_:~33,-2!" (IF !FRFX_CNTR_RNGVAR_! LSS 2 (CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'Firefox Portable' -Profile Any -Program '!FRFX_PRTBLE_FrWLL_RL_DFLT_VAR_:~33,-2!' -Protocol Any}")))))) (SET Thorium_FrWll_CNTR_=0) FOR /F "usebackq tokens=2 delims=\" %%A IN (`REG QUERY "HKCR" /F "ThoriumHTM.*" ^| FINDSTR /LC:"HKEY_CLASSES_ROOT" 2^> nul`) DO (FOR /F "usebackq tokens=3 delims= " %%B IN (`REG QUERY "HKEY_CLASSES_ROOT\%%A\shell\open\command" ^| FINDSTR /LIC:"thorium.exe" 2^> nul`) DO (FOR /F "usebackq tokens=* delims=" %%C IN (`DIR /B /S "%%~dpB*.exe" ^| FINDSTR /V /R "pak_mingw.*exe" 2^> nul`) DO ((SET /A Thorium_FrWll_CNTR_+=1)&CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'Thorium Portable !Thorium_FrWll_CNTR_! ( %%~nC )' -Profile Any -Program '%%~sfC' -Protocol Any;}"))) FOR /F "usebackq tokens=1 delims=.exe" %%A IN (`REG QUERY "HKCU\Software\Vivaldi\ToastActivatorCLSID" /S /F "vivaldi.exe" 2^> nul`) DO (((ECHO %%A| FINDSTR /LC:"vivaldi") >nul 2>&1)&(IF !ErrorLevel! EQU 0 ((SET VIVALDI_PRTBLE_FrWLL_RL_DFLT_VAR_=%%A)&(IF EXIST "!VIVALDI_PRTBLE_FrWLL_RL_DFLT_VAR_:~4,-7!vivaldi.exe" (CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'Vivaldi Portable' -Profile Any -Program '!VIVALDI_PRTBLE_FrWLL_RL_DFLT_VAR_:~4,-7!vivaldi.exe' -Protocol Any}"))&(IF EXIST "!VIVALDI_PRTBLE_FrWLL_RL_DFLT_VAR_:~4,-7!update_notifier.exe" (CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'Vivaldi Portable (Updater)' -Enabled False -Profile Any -Program '!VIVALDI_PRTBLE_FrWLL_RL_DFLT_VAR_:~4,-7!update_notifier.exe' -Protocol Any}"))))) IF EXIST "%ProgramFiles%\NordVPN\nordvpn-service.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Inbound -DisplayName 'NordVPN Service RX' -Profile Any -Program '%ProgramFiles%\NordVPN\nordvpn-service.exe' -Protocol Any -InterfaceType Any;New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'NordVPN Service TX' -Profile Any -Program '%ProgramFiles%\NordVPN\nordvpn-service.exe' -Protocol Any -InterfaceType Any;}" IF EXIST "%ProgramFiles%\NordVPN\NordVPN.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Inbound -DisplayName 'NordVPN RX' -Profile Any -Program '%ProgramFiles%\NordVPN\NordVPN.exe' -Protocol Any -InterfaceType Any;New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'NordVPN TX' -Profile Any -Program '%ProgramFiles%\NordVPN\NordVPN.exe' -Protocol Any -InterfaceType Any;}" FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /A:D "%ProgramFiles%\NordVPN" 2^> nul`) DO ((ECHO "%%A"| FINDSTR /R "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" >nul 2>&1)&(IF !ErrorLevel! EQU 0 (IF EXIST "%ProgramFiles%\NordVPN\%%A\Resources\Binaries\64bit\openvpn-nordvpn.exe" CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Inbound -DisplayName 'NordVPN ( OpenVPN RX )' -Profile Any -Program '%ProgramFiles%\NordVPN\%%A\Resources\Binaries\64bit\openvpn-nordvpn.exe' -Protocol Any -InterfaceType Any;New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName 'NordVPN ( OpenVPN TX )' -Profile Any -Program '%ProgramFiles%\NordVPN\%%A\Resources\Binaries\64bit\openvpn-nordvpn.exe' -Protocol Any -InterfaceType Any;}"))) SET FRWLL_CNTR_NUM=1 SET FRWLL_INNR_CNTR_NUM=0 (SET FRWLLSRTRNGE_TMP_VAR_=) (SET FRWLLSRTRNGE_TMP_VAR_2_=) SET PDVAR_1=^^( SET PDVAR_2=^^) SET PDVAR_3=- ((SET NM_VR_=WebView - EdgeHTML)&(FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\System32\MicrosoftEdge*.exe" 2^> nul`) DO ((SET /A FRWLL_MAX_CNTR_NUM+=1)&(CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName '%ALS_FrWll_STRT% %PDVAR_1% !NM_VR_! %PDVAR_3% !FRWLL_CNTR_NUM! %PDVAR_3% %%~nA %PDVAR_2%' -Enabled False -Profile Any -Program '%%~sfA' -Protocol Any;}")&(SET /A FRWLL_CNTR_NUM+=1)))) :WIN10_11_FR_WLL_SKP_LBL_1_ SET /A WIN10_11_FR_WLL_TST_SRT_VAR_+=1 ((SET NM_VR_=Microsoft Edge)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%ProgramFiles(x86)%\Microsoft\Edge\Application")) ((SET NM_VR_=Microsoft Edge Core)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%ProgramFiles(x86)%\Microsoft\EdgeCore")) ((SET NM_VR_=Microsoft Edge WebView2)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%ProgramFiles(x86)%\Microsoft\EdgeWebView\Application")) ((SET NM_VR_=Microsoft Edge Update)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%ProgramFiles(x86)%\Microsoft\EdgeUpdate")) ((SET NM_VR_=Undocked Update Stack)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "C:\Windows\UUS")) ((SET NM_VR_=WSL)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "C:\PROGRA~1\WSL")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\*LuanNguyen.NuGetPackageExplorer%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=NuGet Package Explorer)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\DolbyLaboratories.DolbyAccess%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Dolby Access)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\DTSInc.DTSSoundUnbound%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=DTS Sound Unbound)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.Copilot%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Microsoft Copilot)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.DesktopAppInstaller%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=App Installer - WinGet)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.Edge.GameAssist%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Microsoft Edge Game Assist)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.GamingApp%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Xbox App)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.GetHelp%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Get Help)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.MicrosoftOfficeHub%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Microsoft 365 - Office)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.MicrosoftStickyNotes%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Sticky Notes)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.MSIXPackagingTool%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=MSIX Packaging Tool)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.OutlookForWindows%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Outlook For Windows)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.Paint%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Paint)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.PowerAutomateDesktop%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Power Automate)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.SecHealthUI%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Windows Security)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.StartExperiencesApp%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Start Experience Host)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.StorePurchaseApp%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Microsoft Store Purchase App)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.WidgetsPlatformRuntime%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Windows Widgets Platform)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.Windows.DevHome%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Dev Home)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.Windows.Photos%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Photos)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.WindowsAlarms%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Clock)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.WindowsCalculator%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Calculator)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.WindowsCamera%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Windows Camera)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.WindowsFeedbackHub%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Feedback Hub)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.WindowsNotepad%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Notepad)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.WindowsSoundRecorder%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Sound Recorder)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.WindowsStore%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Microsoft Store)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.WindowsTerminal%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Windows Terminal)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.Xbox.TCUI%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Xbox UI Connection)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.XboxGamingOverlay%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Xbox Game Bar)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.XboxIdentityProvider%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Xbox Identity Provider)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.XboxSpeechToTextOverlay%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Xbox Speech To Text Overlay)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.YourPhone%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Phone Link)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\Microsoft.ZuneMusic%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Media Player)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\MicrosoftCorporationII.QuickAssist%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Quick Assist)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Windows Subsystem for Linux)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\MicrosoftWindows.Client.WebExperience%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Windows Web Experience Pack)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\MicrosoftWindows.CrossDevice%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Cross Device Experience)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\PROGRA~1\WindowsApps\MSTeams%ARCH_WDTH_WIN_%" 2^> nul`) DO ((SET NM_VR_=Microsoft Teams)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.AAD.BrokerPlugin_*" 2^> nul`) DO ((SET NM_VR_=Work Or School Account)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.AccountsControl_*" 2^> nul`) DO ((SET NM_VR_=Microsoft Accounts)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.AsyncTextService_*" 2^> nul`) DO ((SET NM_VR_=Async Text Service)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.BioEnrollment_*" 2^> nul`) DO ((SET NM_VR_=Windows Hello Biometric Enrollment)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\microsoft.creddialoghost_*" 2^> nul`) DO ((SET NM_VR_=Credential Dialog Host)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.LockApp_*" 2^> nul`) DO ((SET NM_VR_=Lock Screen)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.Win32WebViewHost_*" 2^> nul`) DO ((SET NM_VR_=Win32 Web View Host)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.Windows.AssignedAccessLockApp_*" 2^> nul`) DO ((SET NM_VR_=Assigned Access Lock App)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.Windows.OOBENetworkCaptivePortal_*" 2^> nul`) DO ((SET NM_VR_=OOBE Network Captive Portal)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.Windows.OOBENetworkConnectionFlow_*" 2^> nul`) DO ((SET NM_VR_=OOBE Network Connection Flow)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.Windows.SecureAssessmentBrowser_*" 2^> nul`) DO ((SET NM_VR_=Take A Test)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.Windows.StartMenuExperienceHost_*" 2^> nul`) DO ((SET NM_VR_=Start Menu Experience Host)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.WindowsAppRuntime.CBS_*" 2^> nul`) DO ((SET NM_VR_=Windows App Runtime)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.WindowsAppRuntime.vNext.CBS_*" 2^> nul`) DO ((SET NM_VR_=Windows App Runtime vNext)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Microsoft.XboxGameCallableUI_*" 2^> nul`) DO ((SET NM_VR_=Xbox Game Callable UI)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\MicrosoftWindows.Client.CBS_*" 2^> nul`) DO ((SET NM_VR_=Windows Feature Experience Pack)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\MicrosoftWindows.Client.CoreAI_*" 2^> nul`) DO ((SET NM_VR_=Windows Core AI)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\MicrosoftWindows.Client.Core_*" 2^> nul`) DO ((SET NM_VR_=Windows Core Client)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\MicrosoftWindows.Client.OOBE_*" 2^> nul`) DO ((SET NM_VR_=Out of Box Experience)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\ShellExperienceHost_*" 2^> nul`) DO ((SET NM_VR_=Shell Experience Host)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "C:\Windows\SystemApps\Windows.CBSPreview_*" 2^> nul`) DO ((SET NM_VR_=Windows Camera Bar Preview)&(CALL :WIN10_11_FR_WLL_CRTE_RLST_ "%%A")) IF %WIN10_11_FR_WLL_TST_SRT_VAR_% EQU 1 GOTO WIN10_11_FR_WLL_SKP_LBL_1_ GOTO WIN10_11_FR_WLL_LST_LNE :WIN10_11_FR_WLL_CRTE_RLST_ IF %WIN10_11_FR_WLL_TST_SRT_VAR_% EQU 1 FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "%~1\*.exe" 2^> nul`) DO (SET /A FRWLL_MAX_CNTR_NUM+=1) IF %WIN10_11_FR_WLL_TST_SRT_VAR_% EQU 2 FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "%~1\*.exe" 2^> nul`) DO ((SET _FRWLL_RL_SRT_=New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName '%ALS_FrWll_STRT% %PDVAR_1% !NM_VR_! %PDVAR_3% !FRWLL_CNTR_NUM! %PDVAR_3% %%~nA %PDVAR_2%' -Enabled False -Profile Any -Program '%%~sfA' -Protocol Any;)&(SET FRWLLSRTRNGE_TMP_VAR_=!FRWLLSRTRNGE_TMP_VAR_2_!!_FRWLL_RL_SRT_!)&(SET FRWLLSRTRNGE_TMP_VAR_2_=!FRWLLSRTRNGE_TMP_VAR_!)&(SET /A FRWLL_CNTR_NUM+=1)&(SET /A FRWLL_INNR_CNTR_NUM+=1)&(IF !FRWLL_CNTR_NUM! GTR %FRWLL_MAX_CNTR_NUM% (CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {!FRWLLSRTRNGE_TMP_VAR_2_!}"))&(IF !FRWLL_INNR_CNTR_NUM! EQU 10 ((CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {!FRWLLSRTRNGE_TMP_VAR_2_!}")&(SET FRWLLSRTRNGE_TMP_VAR_2_=)&(SET FRWLL_INNR_CNTR_NUM=0)))) GOTO :EOF :WIN10_11_FR_WLL_LST_LNE ENDLOCAL DisableDelayedExpansion MOVE NUL 2>&0


  3. Use Notepad to create this file on your desktop or another folder: Steam_App_Bidirectional_Firewall_Rule_Creator.bat


    @ECHO OFF SETLOCAL EnableDelayedExpansion CD /D "%~dp0" FOR /F "usebackq tokens=* delims=" %%A IN (`REG QUERY "HKLM\SOFTWARE\WOW6432Node\Valve\Steam" 2^> nul`) DO ((ECHO "%%A"| FINDSTR /LC:"InstallPath" >nul 2>&1)&(IF !ErrorLevel! EQU 0 (SET Steam_App_FrWLL_RL_DFLT_VAR_=%%A))) IF NOT EXIST "!Steam_App_FrWLL_RL_DFLT_VAR_:~29!" GOTO STEAM_APP_FR_WLL_LST_LNE IF [%1]==[] GOTO STEAM_APP_FR_WLL_SKP_LBL_1_ IF %1==BYPASS GOTO STEAM_APP_FR_WLL_SKP_LBL_2_ :STEAM_APP_FR_WLL_SKP_LBL_1_ CLS CHOICE /C YN /N /M "CREATING FIREWALL RULES FOR: [!Steam_App_FrWLL_RL_DFLT_VAR_:~29!] <- [Y/N] TO PROCEED?" IF %ErrorLevel% EQU 2 GOTO STEAM_APP_FR_WLL_LST_LNE :STEAM_APP_FR_WLL_SKP_LBL_2_ SET ALS_FrWll_STRT=Steam_App PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {'%ALS_FrWll_STRT% *' | ForEach-Object -Process {Get-NetFirewallRule | where DisplayName -cLike $_ | Remove-NetFirewallRule}}" SET FRWLL_CNTR_NUM=1 SET FRWLL_INNR_CNTR_NUM=0 (SET FRWLLSRTRNGE_TMP_VAR_=) (SET FRWLLSRTRNGE_TMP_VAR_2_=) SET PDVAR_1=^^( SET PDVAR_2=^^) SET DRV_LTTR_XCHNG_CNTR_=0 FOR /F "usebackq tokens=* delims=" %%A IN (`TYPE "!Steam_App_FrWLL_RL_DFLT_VAR_:~29!\steamapps\libraryfolders.vdf" ^| FINDSTR /LC:"path" 2^>^&1`) DO ((SET /A DRV_LTTR_XCHNG_CNTR_+=1)&(SET DRV_LTTR_XCHNG_=%%A)&(SET PTH_XCHNG_[!DRV_LTTR_XCHNG_CNTR_!]_=!DRV_LTTR_XCHNG_:~11,-1!)) FOR /L %%A IN (1,1,%DRV_LTTR_XCHNG_CNTR_%) DO (FOR /F "usebackq tokens=* delims=" %%B IN (`PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {((Write-Output -InputObject '!PTH_XCHNG_[%%A]_!') -Replace '\\{2}','\');}"`) DO (SET PTH_XCHNG_[%%A]_=%%B)) :STEAM_APP_FR_WLL_SKP_LBL_3_ SET /A STEAM_APP_FR_WLL_TST_SRT_VAR_+=1 FOR /L %%A IN (1,1,%DRV_LTTR_XCHNG_CNTR_%) DO (IF EXIST "!PTH_XCHNG_[%%A]_!" (CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "!PTH_XCHNG_[%%A]_!")) IF EXIST "%CommonProgramFiles(x86)%\Steam" CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "%CommonProgramFiles(x86)%\Steam" IF EXIST "%ProgramFiles(x86)%\Microsoft Games for Windows - LIVE" CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "%ProgramFiles(x86)%\Microsoft Games for Windows - LIVE" FOR /F "usebackq tokens=* delims=" %%A IN (`REG QUERY "HKLM\SOFTWARE\WOW6432Node\Rockstar Games\Launcher" 2^> nul`) DO ((ECHO "%%A"| FINDSTR /LC:"InstallFolder" >nul 2>&1)&(IF !ErrorLevel! EQU 0 ((SET TMP_VAR_=%%A)&(CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "!TMP_VAR_:~31!")))) FOR /F "usebackq tokens=* delims=" %%A IN (`REG QUERY "HKLM\SOFTWARE\WOW6432Node\Rockstar Games\Rockstar Games Social Club" 2^> nul`) DO ((ECHO "%%A"| FINDSTR /LC:"InstallFolder" >nul 2>&1)&(IF !ErrorLevel! EQU 0 ((SET TMP_VAR_=%%A)&(CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "!TMP_VAR_:~31!")))) FOR /F "usebackq tokens=* delims=" %%A IN (`REG QUERY "HKCU\Software\Paradox Interactive\Paradox Launcher v2" 2^> nul`) DO ((ECHO "%%A"| FINDSTR /LC:"LauncherInstallation" >nul 2>&1)&(IF !ErrorLevel! EQU 0 ((SET TMP_VAR_=%%A)&(CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "!TMP_VAR_:~38,-1!")))) IF EXIST "%ProgramFiles(x86)%\AOE URL Helper" CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "%ProgramFiles(x86)%\AOE URL Helper" IF EXIST "%ProgramFiles(x86)%\EasyAntiCheat" CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "%ProgramFiles(x86)%\EasyAntiCheat" IF EXIST "%ProgramFiles(x86)%\EasyAntiCheat_EOS" CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "%ProgramFiles(x86)%\EasyAntiCheat_EOS" IF EXIST "%ProgramFiles%\AntiCheatExpert" CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "%ProgramFiles%\AntiCheatExpert" IF EXIST "%CommonProgramFiles(x86)%\BattlEye" CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "%CommonProgramFiles(x86)%\BattlEye" IF EXIST "%ProgramData%\Nexon\NGS" CALL :STEAM_APP_FR_WLL_CRTE_RLST_ "%ProgramData%\Nexon\NGS" IF %STEAM_APP_FR_WLL_TST_SRT_VAR_% EQU 1 GOTO STEAM_APP_FR_WLL_SKP_LBL_3_ FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /A:D "C:\Windows\Sys*" ^| FINDSTR /R "[0-9]"`) DO (FOR /F "usebackq tokens=* delims=" %%B IN (`DIR /B /S "C:\Windows\%%A\PnkBstr*.exe" 2^> nul`) DO ((CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Inbound -DisplayName '%ALS_FrWll_STRT% !FRWLL_CNTR_NUM! %PDVAR_1% %%~nB %PDVAR_2%' -Profile Any -Program '%%~sfB' -Protocol Any;New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName '%ALS_FrWll_STRT% !FRWLL_CNTR_NUM! %PDVAR_1% %%~nB %PDVAR_2%' -Profile Any -Program '%%~sfB' -Protocol Any;}")&(SET /A FRWLL_CNTR_NUM+=1))) GOTO STEAM_APP_FR_WLL_LST_LNE :STEAM_APP_FR_WLL_CRTE_RLST_ :STEAM_APP_FR_WLL_CRTE_RLST_0_ IF %STEAM_APP_FR_WLL_TST_SRT_VAR_% EQU 2 GOTO STEAM_APP_FR_WLL_CRTE_RLST_1_ FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "%~s1\*.exe" 2^> nul`) DO (SET /A FRWLL_MAX_CNTR_NUM+=1) GOTO STEAM_APP_FR_WLL_CRTE_RLST_2_ :STEAM_APP_FR_WLL_CRTE_RLST_1_ FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "%~s1\*.exe" 2^> nul`) DO ((SET _FRWLL_RL_SRT_=New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Inbound -DisplayName '%ALS_FrWll_STRT% !FRWLL_CNTR_NUM! %PDVAR_1% %%~nA %PDVAR_2%' -Profile Any -Program '%%~sfA' -Protocol Any;New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName '%ALS_FrWll_STRT% !FRWLL_CNTR_NUM! %PDVAR_1% %%~nA %PDVAR_2%' -Profile Any -Program '%%~sfA' -Protocol Any;)&(SET FRWLLSRTRNGE_TMP_VAR_=!FRWLLSRTRNGE_TMP_VAR_2_!!_FRWLL_RL_SRT_!)&(SET FRWLLSRTRNGE_TMP_VAR_2_=!FRWLLSRTRNGE_TMP_VAR_!)&(SET /A FRWLL_CNTR_NUM+=1)&(SET /A FRWLL_INNR_CNTR_NUM+=1)&(IF !FRWLL_CNTR_NUM! GTR %FRWLL_MAX_CNTR_NUM% (CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {!FRWLLSRTRNGE_TMP_VAR_2_!}"))&(IF !FRWLL_INNR_CNTR_NUM! EQU 10 ((CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {!FRWLLSRTRNGE_TMP_VAR_2_!}")&(SET FRWLLSRTRNGE_TMP_VAR_2_=)&(SET FRWLL_INNR_CNTR_NUM=0)))) :STEAM_APP_FR_WLL_CRTE_RLST_2_ GOTO :EOF :STEAM_APP_FR_WLL_LST_LNE ENDLOCAL DisableDelayedExpansion MOVE NUL 2>&0


  4. Use Notepad to create this file on your desktop or another folder: Simple_Bidirectional_Firewall_Rule_Creator.bat


    @ECHO OFF SETLOCAL EnableDelayedExpansion CD /D "%~dp0" IF [%1]==[] GOTO SMPL_RL_CRTE_FR_WLL_SKP_LBL_1_ IF NOT %1==BYPASS GOTO SMPL_RL_CRTE_FR_WLL_SKP_LBL_1_ IF [%2]==[] GOTO SMPL_RL_CRTE_FR_WLL_SKP_LBL_1_ (ECHO %2| FINDSTR /R "[^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]" >nul 2>&1)&(IF !ErrorLevel! EQU 0 (GOTO SMPL_RL_CRTE_FR_WLL_SKP_LBL_1_)) SET ALS_PRM_FrWll_VAR_=%2 SET ALS_FrWll_STRT=%ALS_PRM_FrWll_VAR_% IF [%3]==[] GOTO SMPL_RL_CRTE_FR_WLL_SKP_LBL_1_ SET CNTR_FrwllVAR_=0 FOR %%A IN (%*) DO (IF EXIST %%A ((SET SMPL_PTH_TST_FrwllVAR_=%%~sfA)&((IF "!SMPL_PTH_TST_FrwllVAR_:~-1!"=="\" (IF EXIST "!SMPL_PTH_TST_FrwllVAR_:~0,-1!" (SET PTH_FrWll_STRT=!SMPL_PTH_TST_FrwllVAR_:~0,-1!)))&(IF NOT "!SMPL_PTH_TST_FrwllVAR_:~-1!"=="\" (SET PTH_FrWll_STRT=!SMPL_PTH_TST_FrwllVAR_!))&(SET RNGE_SMPLFRWLL_VAL_CHK_=0)&(IF !CNTR_FrwllVAR_! GTR 1 FOR /L %%A IN (1,1,!CNTR_FrwllVAR_!) DO (((ECHO !SMPLFRWLL_VAL_CHK_[%%A]_!| FIND "!PTH_FrWll_STRT!" >nul 2>&1)&(IF !ErrorLevel! EQU 0 (SET RNGE_SMPLFRWLL_VAL_CHK_=1)))))&(IF !RNGE_SMPLFRWLL_VAL_CHK_! EQU 0 ((SET /A CNTR_FrwllVAR_+=1)&(SET SMPLFRWLL_VAL_CHK_[!CNTR_FrwllVAR_!]_=!PTH_FrWll_STRT!)))))) IF !CNTR_FrwllVAR_! EQU 0 GOTO SMPL_RL_CRTE_FR_WLL_LST_LNE GOTO SMPL_RL_CRTE_FR_WLL_SKP_LBL_2_ :SMPL_RL_CRTE_FR_WLL_SKP_LBL_1_ :RESET_LBL_FRWLL_RL_CRTE_SMPLE_ CLS ECHO ...SELECT FOLDER NAME AND ALIAS FOR FIREWALL SCRIPT GENERATOR SET /P PTH_PRM_FrWll_VAR_="[FOLDER NAME]: " FOR /F "usebackq tokens=* delims=" %%A IN (`ECHO %PTH_PRM_FrWll_VAR_% 2^>^&1`) DO (IF NOT EXIST %%~sfA (GOTO RESET_LBL_FRWLL_RL_CRTE_SMPLE_)) SET /P ALS_PRM_FrWll_VAR_="[GROUP/ALIAS]: " (ECHO %ALS_PRM_FrWll_VAR_%| FINDSTR /R "[^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]" >nul 2>&1)&(IF !ErrorLevel! EQU 0 (GOTO RESET_LBL_FRWLL_RL_CRTE_SMPLE_)) IF "%PTH_PRM_FrWll_VAR_:~-1%"=="\" (IF EXIST "%PTH_PRM_FrWll_VAR_:~0,-1%" (SET PTH_FrWll_STRT=%PTH_PRM_FrWll_VAR_:~0,-1%)) IF NOT "%PTH_PRM_FrWll_VAR_:~-1%"=="\" (SET PTH_FrWll_STRT=%PTH_PRM_FrWll_VAR_%) SET ALS_FrWll_STRT=%ALS_PRM_FrWll_VAR_% CHOICE /C YN /N /M "FOLDER PATH: [%PTH_FrWll_STRT%] GROUP/ALIAS: [%ALS_FrWll_STRT%] <- [Y/N] TO PROCEED?" IF %ErrorLevel% EQU 2 GOTO RESET_LBL_FRWLL_RL_CRTE_SMPLE_ SET CNTR_FrwllVAR_=1 FOR /F "usebackq tokens=* delims=" %%A IN (`ECHO %PTH_FrWll_STRT% 2^>^&1`) DO (SET SMPLFRWLL_VAL_CHK_[1]_=%%~sfA) :SMPL_RL_CRTE_FR_WLL_SKP_LBL_2_ PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {'%ALS_FrWll_STRT% * ( * )' | ForEach-Object -Process {Get-NetFirewallRule | where DisplayName -cLike $_ | Remove-NetFirewallRule}}" SET FRWLL_CNTR_NUM=1 SET FRWLL_INNR_CNTR_NUM=0 (SET FRWLLSRTRNGE_TMP_VAR_=) (SET FRWLLSRTRNGE_TMP_VAR_2_=) SET PDVAR_1=^^( SET PDVAR_2=^^) FOR /L %%B IN (1,1,!CNTR_FrwllVAR_!) DO (FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "!SMPLFRWLL_VAL_CHK_[%%B]_!\*.exe" 2^> nul`) DO (SET /A FRWLL_MAX_CNTR_NUM+=1)) FOR /L %%B IN (1,1,!CNTR_FrwllVAR_!) DO (FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "!SMPLFRWLL_VAL_CHK_[%%B]_!\*.exe" 2^> nul`) DO (((SET _FRWLL_RL_SRT_=New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Inbound -DisplayName '%ALS_FrWll_STRT% !FRWLL_CNTR_NUM! %PDVAR_1% %%~nA %PDVAR_2%' -Profile Any -Program '%%~sfA' -Protocol Any;New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName '%ALS_FrWll_STRT% !FRWLL_CNTR_NUM! %PDVAR_1% %%~nA %PDVAR_2%' -Profile Any -Program '%%~sfA' -Protocol Any;)&(SET FRWLLSRTRNGE_TMP_VAR_=!FRWLLSRTRNGE_TMP_VAR_2_!!_FRWLL_RL_SRT_!)&(SET FRWLLSRTRNGE_TMP_VAR_2_=!FRWLLSRTRNGE_TMP_VAR_!)&(SET /A FRWLL_CNTR_NUM+=1)&(SET /A FRWLL_INNR_CNTR_NUM+=1)&(IF !FRWLL_CNTR_NUM! GTR %FRWLL_MAX_CNTR_NUM% (CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {!FRWLLSRTRNGE_TMP_VAR_2_!}"))&(IF !FRWLL_INNR_CNTR_NUM! EQU 10 ((CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {!FRWLLSRTRNGE_TMP_VAR_2_!}")&(SET FRWLLSRTRNGE_TMP_VAR_2_=)&(SET FRWLL_INNR_CNTR_NUM=0)))))) :SMPL_RL_CRTE_FR_WLL_LST_LNE ENDLOCAL DisableDelayedExpansion MOVE NUL 2>&0


  5. Use Notepad to create this file on your desktop or another folder: Current_Directory_Temp_Bidirectional_Firewall_Rule_Creator.bat


    @ECHO OFF SETLOCAL EnableDelayedExpansion CD /D "%~dp0" FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "%~dp0*.exe" 2^> nul`) DO (SET /A FRWLL_MAX_CNTR_NUM+=1) IF !FRWLL_MAX_CNTR_NUM! LSS 1 GOTO CRRNTDIRECTORY_APP_FR_WLL_LST_LNE ECHO ...Creating %FRWLL_MAX_CNTR_NUM% Temporary Firewall Rules For The Current Directory PAUSE SET ALS_FrWll_STRT=Current_Directory_Temp_Rule PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {'%ALS_FrWll_STRT% * ( * )' | ForEach-Object -Process {Get-NetFirewallRule | where DisplayName -cLike $_ | Remove-NetFirewallRule}}" SET FRWLL_CNTR_NUM=1 SET FRWLL_INNR_CNTR_NUM=0 (SET FRWLLSRTRNGE_TMP_VAR_=) (SET FRWLLSRTRNGE_TMP_VAR_2_=) SET PDVAR_1=^^( SET PDVAR_2=^^) FOR /F "usebackq tokens=* delims=" %%A IN (`DIR /B /S "%~dp0*.exe" 2^> nul`) DO ((SET _FRWLL_RL_SRT_=New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Inbound -DisplayName '%ALS_FrWll_STRT% !FRWLL_CNTR_NUM! %PDVAR_1% %%~nA %PDVAR_2%' -Profile Any -Program '%%~sfA' -Protocol Any;New-NetFirewallRule -PolicyStore PersistentStore -Action Allow -Direction Outbound -DisplayName '%ALS_FrWll_STRT% !FRWLL_CNTR_NUM! %PDVAR_1% %%~nA %PDVAR_2%' -Profile Any -Program '%%~sfA' -Protocol Any;)&(SET FRWLLSRTRNGE_TMP_VAR_=!FRWLLSRTRNGE_TMP_VAR_2_!!_FRWLL_RL_SRT_!)&(SET FRWLLSRTRNGE_TMP_VAR_2_=!FRWLLSRTRNGE_TMP_VAR_!)&(SET /A FRWLL_CNTR_NUM+=1)&(SET /A FRWLL_INNR_CNTR_NUM+=1)&(IF !FRWLL_CNTR_NUM! GTR %FRWLL_MAX_CNTR_NUM% (CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {!FRWLLSRTRNGE_TMP_VAR_2_!}"))&(IF !FRWLL_INNR_CNTR_NUM! EQU 10 ((CMD /Q /C START /MIN PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {!FRWLLSRTRNGE_TMP_VAR_2_!}")&(SET FRWLLSRTRNGE_TMP_VAR_2_=)&(SET FRWLL_INNR_CNTR_NUM=0)))) ECHO ...Removing %FRWLL_MAX_CNTR_NUM% Temporary Firewall Rules Created For The Current Directory PAUSE PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {'%ALS_FrWll_STRT% * ( * )' | ForEach-Object -Process {Get-NetFirewallRule | where DisplayName -cLike $_ | Remove-NetFirewallRule}}" :CRRNTDIRECTORY_APP_FR_WLL_LST_LNE ENDLOCAL DisableDelayedExpansion MOVE NUL 2>&0



SIDE NOTE: If you put RESET in front of the second batch file, it will create an initial set of firewall rules for the operating system and network stack itself, by restoring the default firewall policy, resetting to the default firewall rules, disabling the default inbound firewall rules, enabling stealth mode for ipsec, enabling some firewall rules to allow basic functionality needed for secure logins in conjunction with a 3rd party dns stub resolver, vpn, and portable web browsers:


CMD /Q /C START /MIN /REALTIME %UserProfile%\Desktop\Configure_Win10_11_Firewall.bat RESET Alternate: CMD /Q /C START /MIN /REALTIME /WAIT /B %UserProfile%\Desktop\Configure_Win10_11_Firewall.bat RESET


SIDE NOTE: If you put BYPASS in front of the third batch file, it will create a firewall ruleset for the app, and the all the associated games, unattended in the background:


CMD /Q /C START /MIN /REALTIME %UserProfile%\Desktop\Steam_App_Bidirectional_Firewall_Rule_Creator.bat BYPASS CMD /Q /C START /MIN /REALTIME %UserProfile%\Desktop\Simple_Bidirectional_Firewall_Rule_Creator.bat BYPASS Battle_Net_App "D:/Battle.net/" "E:/Battle.net/" "%ProgramData%\Battle.net_components\" "%ProgramData%\Blizzard Entertainment\" "%ProgramData%/Battle.net/" "%LocalAppData%/Battle.net/" "%LocalAppData%\Blizzard Entertainment\" "%LocalAppData%/Battle.net/" "%LocalAppData%\Blizzard\" "%UserProfile%\AppData\LocalLow\Blizzard Entertainment\" "%AppData%\Blizzard Entertainment\" "%AppData%/Battle.net/" "%AppData%\Blizzard\" Alternate: CMD /Q /C START /MIN /REALTIME /WAIT /B %UserProfile%\Desktop\Steam_App_Bidirectional_Firewall_Rule_Creator.bat BYPASS CMD /Q /C START /MIN /REALTIME /WAIT /B %UserProfile%\Desktop\Simple_Bidirectional_Firewall_Rule_Creator.bat BYPASS Battle_Net_App "D:/Battle.net/" "E:/Battle.net/" "%ProgramData%\Battle.net_components\" "%ProgramData%\Blizzard Entertainment\" "%ProgramData%/Battle.net/" "%LocalAppData%/Battle.net/" "%LocalAppData%\Blizzard Entertainment\" "%LocalAppData%/Battle.net/" "%LocalAppData%\Blizzard\" "%UserProfile%\AppData\LocalLow\Blizzard Entertainment\" "%AppData%\Blizzard Entertainment\" "%AppData%/Battle.net/" "%AppData%\Blizzard\"
< >
Showing 1-2 of 2 comments
this is same with discussion for "Run The Game in Hardware Mode"
Originally posted by iqionly:
this is same with discussion for "Run The Game in Hardware Mode"
This is totally unique and has nothing to do with that. I also wrote and tested this myself before uploading any information about it. The free documentation provided on the Microsoft Learn website was referenced to create this, which anyone is allowed to do that, even you.
< >
Showing 1-2 of 2 comments
Per page: 1530 50