Windows 10: Stop Windows 10 Updates Properly and Completely

Discus and support Stop Windows 10 Updates Properly and Completely in Windows 10 Updates and Activation to solve the problem; Matthew, Nothing explains the problem yet. - It is not the English/Chinese at the start of the Registry key because that is just something that... Discussion in 'Windows 10 Updates and Activation' started by EdTittel, Feb 24, 2018.

  1. Try3 Win User

    Stop Windows 10 Updates Properly and Completely


    Matthew,

    Nothing explains the problem yet.
    - It is not the English/Chinese at the start of the Registry key because that is just something that appears at the start in the RegEdit address bar, it is not part of the Reg Query command in the batch file.
    - It is not any difference in the way the Administrators name is checked. You are correct about "... BUILTIN\Administrators" not appearing in the batch file, the command Set Owner=%Owner:*\=% removes it without any need to quote it.

    The very last line of the batch file is :Stop Windows 10 Updates Properly and Completely :pause at end during testing so remove the :: to make it just Pause at end during testing. Then run the batch file and compare the contents of the window to the posted a text file showing the whole progress of a successful run of the batch file. At which line do your results differ?

    Denis
     
  2. Try3 Win User

    Matthew,

    I see that you were unable to run net user <YourAdminAccountUserName> By this syntax I meant that, if the username of your Admin account is Wai, you should enter net user Wai

    Then you can check your language version's spelling for Administrators on the Local Group Memberships line of the output

    Stop Windows 10 Updates Properly and Completely [​IMG]


    This matters because the USOClient checks will return the results using the same spelling so it will be that spelling that the batch file compares to the word Administrators.

    Denis
     
  3. Code: Pause at end during testing[/quote] Without the colons, the results are these.
     
    Matthew Wai, Apr 26, 2018
    #48
  4. Try3 Win User

    Stop Windows 10 Updates Properly and Completely

    Matthew,

    For your language setting, change the line
    If %OutputCounter% EQU 3 Set Owner=%1
    so that it now reads
    If %OutputCounter% EQU 2 Set Owner=%1

    This should work but I do not understand why the change is needed - your post #41 shows the same line-by-line response in both language settings yet your full results show that it needs the change.

    Denis
     
  5. Stop Windows 10 Updates Properly and Completely [​IMG]

    As a poorly educated Chinese guy, my English comprehension is terribly poor.
     
    Matthew Wai, Apr 26, 2018
    #50
  6. Try3 Win User
    Matthew,

    IGNORE - see my new batch file below

    I need to provide you with a batch file that works whichever language setting you are using at the time. I think I can do this but I need you to run some experimental commands so I can see exactly what I need to do.

    First of all, I need to know that the change I suggested above [If %OutputCounter% EQU 2 Set Owner=%1] actually works.


    Then please create a batch file called GetUILangauge.bat [this version 2 is just a bit tidier] containing
    Code: prompt $g For /F "usebackq tokens=3 " %%X in (`Reg Query "HKCU\Control Panel\Desktop" /v PreferredUILanguages`) Do Set UILanguage=%%X echo %UILanguage% Pause - Now copy and post the results[/quote] On my computer, this version 2 displays
    Code: >prompt $g >For /F "usebackq tokens=3 " %X in (`Reg Query "HKCU\Control Panel\Desktop" /v PreferredUILanguages`) Do Set UILanguage=%X >Set UILanguage=en-GB >echo en-GB en-GB >Pause - Now copy and post the results Press any key to continue . . .[/quote]
    If you post what your computer displays using both your English & your Chinese language settings then I can add commands into the batch file to recognise the language and adjust for the difference.
    Denis
     
  7. lx07 Win User
    I think you need to use SID not names of users for multi-lingual as they don't change.

    For example in your script you do dir /q and check for BUILTIN\Administrators. To make it multi-lingual you'd have to check for S-1-5-32-544 instead as spelling of "Administrators" changes.

    I really don't know how to retrieve the SID of a file though. Something like this perhaps but there must be a better way. Code: C:\Windows\system32>dir "C:\Temp\test.txt" /q Volume in drive C has no label. Volume Serial Number is 63D0-2EE0 Directory of C:\Temp 27-Apr-18 08:12 0 BUILTIN\Administrators test.txt 1 File(s) 0 bytes 0 Dir(s) 20,507,557,888 bytes free C:\Windows\system32>wmic path Win32_LogicalFileSecuritySetting where Path="C:\\Temp\\test.txt" ASSOC /RESULTROLE:Owner __PATH \\X201\root\cimv2:Win32_LogicalFileSecuritySetting.Path="C:\\Temp\\test.txt" \\X201\root\cimv2:Win32_SID.SID="S-1-5-32-544" root\cimv2 X201 {} 5 Win32_SID.SID="S-1-5-32-544" Win32_SID Win32_SID 2 Administrators {1, 2, 0, 0, 0, 0, 0, 5, 32, 0, 0, 0, 32, 2, 0, 0} BUILTIN S-1-5-32-544 16 C:\Windows\system32>[/quote]
     
  8. Try3 Win User

    Stop Windows 10 Updates Properly and Completely

    lxo7,

    Thanks. I would have to make an assumption about the wmic output [that the owner is always the word following Win32_SID 2] and find out how to extract the owner from its response [I have not been able to use wmic expression in For commands]. I would still have the problem of the relevant output appearing on different lines in different languages.

    I think that for the time being I will focus on helping Matthew with a language check for his UI languages.

    Denis
     
  9. Try3 Win User
    Matthew,

    I have figured out how to cope with the different language settings [in your case at least]. Here is the modified batch file CriticalSystemChecks-Matthew-v10.bat

    Code: :: This must be run as Admin prompt $g Title CriticalSystemChecks :: Test if running as Admin by testing access to a particular Registry key reg query "HKU\S-1-5-19" >nul If %errorlevel% EQU 0 (GoTo StartChecks) Else (Call :Reporting "You must run this file 'as Admin'") :StartChecks :: 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 Owner= For /F "usebackq tokens=4 " %%X in (`dir "%WINDIR%\System32\UsoClient.exe" /q`) Do Call :ExtractOwner %%X If "%Owner%"=="Administrators" GoTo NFA Call :Reporting "USOClientOwner is not Administrators" GoTo NFA :ExtractOwner set ThisLine=%1 If "%ThisLine:~0,7%"=="BUILTIN" Set Owner=%1 If "%ThisLine:~0,7%"=="BUILTIN" Set Owner=%Owner:*\=% GoTo :EOF :Reporting :: This section was removed above to avoid distracting from the main point of the post Title ERROR Pause This is a very, very basic reporting tool - %~1 GoTo :EOF :NFA Pause at end during testing[/quote] Please run this as Admin. I think it will work without any further amendment. We can then talk about
    1 What :Reporting scheme/tool you are going to use, and
    2 how to add this as a task in Task scheduler.

    Denis
     
  10. Matthew Wai, Apr 26, 2018
    #55
  11. Try3 Win User
    Matthew,

    Great.

    Now, I do not know how you want to report problems.
    - You should be able to see the batch file on the Taskbar and that might satisfy you.
    - In all my batch files that need to show info to the user, I use one of the reporting tools I mentioned in my post #33. If you want to consider one of these then I would suggest that the simple MsgBox is the most appropriate so we can discuss that if you want.

    You will probably want to launch the batch file automatically every time you log on. This can be done in Task scheduler but it will run the batch files in windows that will be visible onscreen. There is a method for tricking it into running batch files minimised -
    1 Put the batch file somewhere permanent - I suggest creating a Tools folder using the procedure I describe in my post #33 discussion of CustomMsgBox [a separate zip file to download from the one for MsgBox].
    2 Create a shortcut to the batch file and put it in the same folder - this shortcut needs to specify that the batch file is to run with Admin permission, minimised & with whatever icon you select in its properties.
    3 Create a vbs file that launches the shortcut. This is only two lines long and I can tell you what to put in it as soon as I know the folder path where you have the batch file & its shortcut and what filename you use for the shortcut.
    4 Set up a Task scheduler task to run the vbs file [not the batch file, not the shortcut] at log on of the user. This requires your user account to be an Admin one as it can only run on such an account. I can also give you the details of this by copying my own task.

    Denis
     
  12. Try3,

    I have modified your script. Please set your connection as NON-metered and then run the following script NOT as an administrator and follow the instructions. Code: :: This must be run as Admin :: ************************************************************************************/ title 【Check whether the update settings have been changed.】 mode con cols=64 lines=6 color 17 cls @echo off openfiles>nul 2>&1 if %errorlevel%==0 goto Check_it_out echo ============================================================= echo You have not run this file as an administrator. echo Please right-click on it and select "Run as administrator". echo Press any key to exit. echo ============================================================= pause>nul Exit :: *********************************************************************************/ : Check_it_out prompt $g Title CriticalSystemChecks :: Test if running as Admin by testing access to a particular Registry key reg query "HKU\S-1-5-19" >nul If %errorlevel% EQU 0 (GoTo StartChecks) Else (Call :Reporting "You must run this file 'as Admin'") :StartChecks :: 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 Owner= For /F "usebackq tokens=4 " %%X in (`dir "%WINDIR%\System32\UsoClient.exe" /q`) Do Call :ExtractOwner %%X If "%Owner%"=="Administrators" GoTo NFA Call :Reporting "USOClientOwner is not Administrators" GoTo NFA :ExtractOwner set ThisLine=%1 If "%ThisLine:~0,7%"=="BUILTIN" Set Owner=%1 If "%ThisLine:~0,7%"=="BUILTIN" Set Owner=%Owner:*\=% GoTo :EOF :Reporting :: This section was removed above to avoid distracting from the main point of the post Title ERROR echo ================================================== echo Attention! Update settings have been changed. echo Press any key to exit. echo ================================================== pause>nul Exit GoTo :EOF :NFA[/quote]
     
    Matthew Wai, Apr 26, 2018
    #57
  13. Try3 Win User

    Stop Windows 10 Updates Properly and Completely

    Matthew,

    Yes, that works.

    Denis
     
  14. I do have the folder "C:\●", which contains a CMD file for PPPoE connection and a VBScript file for update checks. Assuming the file path is "C:\●\The_batch_file.bat", how can I run it minimized?
    I found the following command at How to run a batch file or other file minimized
    start /min myfile.bat
    But I don't know how to use it.
     
    Matthew Wai, Apr 27, 2018
    #59
  15. Your link does not go to post #33. ◄┅This one does.
     
    Matthew Wai, Apr 27, 2018
    #60
Thema:

Stop Windows 10 Updates Properly and Completely

Loading...
  1. Stop Windows 10 Updates Properly and Completely - Similar Threads - Stop Updates Properly

  2. Updates completely stopped working.

    in Windows 10 Installation and Upgrade
    Updates completely stopped working.: After AI installed on my computer Updates completely stopped working. Cannot get History. Troubleshooter cannot find the issue.* Changed to a question https://answers.microsoft.com/en-us/windows/forum/all/updates-completely-stopped-working/8874ea56-49f9-42e0-be4e-c2004cfcac01
  3. Updates completely stopped working.

    in Windows 10 Gaming
    Updates completely stopped working.: After AI installed on my computer Updates completely stopped working. Cannot get History. Troubleshooter cannot find the issue. https://answers.microsoft.com/en-us/windows/forum/all/updates-completely-stopped-working/8874ea56-49f9-42e0-be4e-c2004cfcac01
  4. Updates completely stopped working.

    in Windows 10 Software and Apps
    Updates completely stopped working.: After AI installed on my computer Updates completely stopped working. Cannot get History. Troubleshooter cannot find the issue. https://answers.microsoft.com/en-us/windows/forum/all/updates-completely-stopped-working/8874ea56-49f9-42e0-be4e-c2004cfcac01
  5. Updates completely stopped working.

    in Windows 10 Installation and Upgrade
    Updates completely stopped working.: After AI installed on my computer Updates completely stopped working. Cannot get History. Troubleshooter cannot find the issue. https://answers.microsoft.com/en-us/windows/forum/all/updates-completely-stopped-working/8874ea56-49f9-42e0-be4e-c2004cfcac01
  6. Window 10 update not completed

    in Windows 10 Installation and Upgrade
    Window 10 update not completed: Hi, I have tried to update the windows 10 latest version in my Laptop but unable to do so, the installation percentage showing 99% since past 24 hrs, how do I fix the issue please let me know. Note - I have install Windows Assistant...
  7. Windows 10 update will not complete

    in Windows 10 Installation and Upgrade
    Windows 10 update will not complete: I had to reload windows on my computer and it is operational and functional but there are a lot of updates to be applied. It downloads and runs but never completes. It sits at 99% on Getting your update ready. I leave it overnight and it never completes. I reboot and...
  8. Windows 10 Home Edition v2018 - STOP WINDOWS UPDATE COMPLETELY

    in Windows 10 Installation and Upgrade
    Windows 10 Home Edition v2018 - STOP WINDOWS UPDATE COMPLETELY: Hi I have Windows 10 Home Edition v2018 How do I stop windows update ? every single time i restart my laptop , The windows update starts runs for 20 minutes completes and than upon restart i get message sorry we couldnt complete the updates and than another 20 minutes...
  9. Windows 10 will not complete updates

    in Windows 10 Installation and Upgrade
    Windows 10 will not complete updates: Ver: 1803, build: 17134.345 Windows Update tells me that my device is missing important security and quality fixes. When check for updates is selected, it cannot find anything to update. Is this a new bug that is being worked on or a hidden check box that I'm not aware of?...
  10. How to Stop the Updates.......... Completely

    in Windows 10 Updates and Activation
    How to Stop the Updates.......... Completely: Good afternoon, How do I get the updates to stop. I want to do a COMPLETE stop of the updates. 106312