Here are the steps to block a software’s internet connection by modifying the registry:
Open the Registry Editor by pressing Windows key + R and typing “regedit” in the Run dialog box.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options.
Right-click on Image File Execution Options and select New > Key.
Type in the name of the executable file of the software you want to block internet access for, followed by “.exe” (e.g., “example.exe”).
Select the newly created key, right-click on an empty area in the right pane, and choose New > DWORD (32-bit) Value.
Name this value “DisableNetworkAccess”.
Double-click on DisableNetworkAccess and change its value from 0 to 1.
Close Registry Editor and restart your computer for changes to take effect.
Note that this method will only work for applications that use WinINet or WinHTTP APIs for internet connectivity, and it may not be effective against all software programs as some may have built-in mechanisms to bypass these restrictions. Additionally, modifying the registry can be risky, so it is recommended to backup your registry before making any changes.