New
#31
Like Matthew & some of the others, I have also relied on metered connections to avoid updates.
- I have not messed with any services.
- This has worked well.
- I do also manually check each known network if I have to repeat the metered defaults because if I have fiddled with their metered settings individually beforehand they can stop falling into line with the default setting.
- There were occasionally worrying 'last updated' indicators in Settings, Updates, WU so I have added in the withdrawal of permissions from usoclient.exe that is also described in this thread.
- I have still never needed to alter any services.
One of the benefits of the metered-connections-with-castrated-usoclient approach is that it is very easy to monitor and it does not change during a Windows session [updates that might change it do so during reboots].
- I run an elevated TS task triggered by Log on [separate TS task for each user because it needs an interface to report problems].
- If I have installed an update that has reset the default metered settings or usoclient ownership [set to Administrators as part of the permissions removal procedure given earlier in this thread], I get told within a few seconds of re/starting the computer.
This is the heart of my monitoring batch file. I have removed most of the reporting bits & bobs because they would merely be a distraction but [26/4/18] have added in a very, very basic reporting mechanism so that you can see it all working.
I hope this is useful,Code::: This must be run as Admin prompt $g Title CriticalSystemChecks :: Check default metered settings Set MeteringOutputFile=%Temp%\%Random%-MeteredCheck.txt Set /a MeteringCounter=1 Set MeteringAlarm=Off :CheckStatus :: Set parameter to examine for each loop If %MeteringCounter% EQU 1 Set MeteringCheck=WiFi If %MeteringCounter% EQU 2 Set MeteringCheck=Ethernet If %MeteringCounter% EQU 3 Set MeteringCheck=Default Reg Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /t REG_DWORD | Find "%MeteringCheck% REG_DWORD" >%MeteringOutputFile% set /p MeteringSetting=<%MeteringOutputFile% If not "%MeteringSetting:*x=%"=="2" (Set MeteringAlarm=On) & GoTo EndMeteredCheck Set /a MeteringCounter=%MeteringCounter%+1 If %MeteringCounter% LEQ 3 GoTo CheckStatus :EndMeteredCheck del %MeteringOutputFile% :: Report only if one or more are set to non-metered [i.e. their values were not 2 - this includes unexpected error values] If "%MeteringAlarm%"=="Off" GoTo FindUSOClientOwner Call :Reporting "Not all network types are metered" GoTo FindUSOClientOwner :FindUSOClientOwner Set /a OutputCounter=0 Set Owner= For /F "usebackq tokens=4 " %%X in (`dir "%WINDIR%\System32\UsoClient.exe" /q`) Do Call :ExtractOwner %%X Set Owner=%Owner:*\=% If "%Owner%"=="Administrators" GoTo NFA Call :Reporting "USOClientOwner is not Administrators" GoTo NFA :ExtractOwner :: Capture line 3 Set /a OutputCounter=%OutputCounter%+1 If %OutputCounter% EQU 3 Set Owner=%1 GoTo :EOF :Reporting :: This is normally a dialog box using variables set in each stage but mostly removed above to avoid distracting from the main point of the post Pause This is a very, very basic reporting tool - %1 GoTo :EOF :NFA ::Pause at end during testing
Denis
Last edited by Try3; 25 Apr 2018 at 23:27.