Created
June 13, 2016 17:38
-
-
Save matejskubic/eee78bbb099bff49dfa557f578f565ae to your computer and use it in GitHub Desktop.
How to set an Ethernet Connection as Metered to control Updates, Drivers, Store and others
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM source: https://answers.microsoft.com/en-us/windows/forum/windows_10-networking/how-to-set-an-ethernet-connection-as-metered-to/ecdaca08-d413-4a6a-9e33-b4afb337fc18?auth=1 | |
REM The key is [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost] | |
REM There are entries under it for 3G, 4G, Default, Ethernet and Wifi. The normal settings for 3G and 4G are 2. For Ethernet and Wifi (and Default) it is 1. 2 means metered, 1 means not metered. So to make Ethernet Metered, the value needs to be changed from 1 to 2. | |
rem run from install directory | |
cd /d C:\Program Files\Windows Resource Kits\Tools\ | |
rem change owner to Administrators | |
rem should report: Done: 1, Modified 1, Failed 0, Syntax errors 0 | |
subinacl /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /setowner=administrators | |
rem give Administrators full permission | |
rem should report: Done: 1, Modified 1, Failed 0, Syntax errors 0 | |
subinacl /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /grant=administrators=f | |
rem change settings to 2 = metered | |
rem each should report: The operation completed successfully. | |
reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v Ethernet /t REG_DWORD /d 2 /f | |
reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v Default /t REG_DWORD /d 2 /f | |
reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v WiFi /t REG_DWORD /d 2 /f | |
rem check completed OK | |
pause | |
rem change the "/d 2" parameters to "/d 1" to restore the standard unmetered state if needed. | |
--------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment