Sledgehammer - Windows 10 Update Control

Discussion in 'MDL Projects and Applications' started by pf100, Nov 28, 2016.

  1. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,066
    10
    #201 shewolf, Mar 4, 2018
    Last edited: Jan 29, 2019
    Access to this post is restricted!
    You're trying to open the post, written by @shewolf,
    but unfortunately it was marked as a draft (by the user himself or the UFO)
    :p:p

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. lomticksoftoast

    lomticksoftoast MDL Member

    Nov 12, 2009
    189
    143
    10
    #202 lomticksoftoast, Mar 4, 2018
    Last edited: Mar 4, 2018
    fantastico! I will use the manual setting you provide in your stupendo tool , though I really, really appreciate that pf100 is making such a huge effort to automate this whole process. He's right in that his script does work!

    In acceptance of this reward, I'd like to thank my mother and my father and all my friends at MDL ...
    shewolf
    pf100
    GodHand

    MrX
    Enthousiast
    there are so many more! But you know who you are!
    Without your tireless efforts this award wouldn't be possible!
    Thank, thank you all! :rolleyes:

    Edit: acknowledging pf100, the owner of this thread, and hoping he can continue to incorporate all the great ideas coming his way into his amazing automated WUMT script!
     
  3. Black_dog

    Black_dog MDL Novice

    Apr 26, 2009
    13
    3
    0
    Hi All,
    I simply add WSUS registry settings to point to a non-existent WSUS server,. This allows me to decide when updates would occur.

    My windows update says "settings are controlled by your organisation" and won't download updates.

    Does this no longer work in recent releases? I figured if it did still work your wouldn't have a much need for this script, on the other hand with
    the way microsoft is going, it probably doesn't.

    Pushing downloads over a metered connection, such nerve.
     
  4. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,447
    1,424
    60
    Thanks, script updated.
     
  5. lomticksoftoast

    lomticksoftoast MDL Member

    Nov 12, 2009
    189
    143
    10
    I'm afraid you are correct. I deserve the minchia (head) Oscar!
    You should give the real Oscars to pf100 (in the category of "Best known-working solution") and to rpo (in the category of "Best use of shewolf's firewall solution")
    Only applying the Permissions to Disable UsoClient.exe on it's own didn't work. (I edited my earlier post)
    Plus, I'm afraid I must tell you that using your brilliant WUMT application to make changes to Windows Update service as shown in the picture attached to your post really does nothing without using some other combination of additional solutions--as achieved using pf100's or possibly rpo's script.
    That it is all.
     
  6. lomticksoftoast

    lomticksoftoast MDL Member

    Nov 12, 2009
    189
    143
    10
    Have you had any issues with your DNS Cache or blocking DNS as as discussed here:
     
  7. TairikuOkami

    TairikuOkami MDL Expert

    Mar 15, 2014
    1,172
    1,055
    60
    No, I disable DNS Cache since Vista on mine and other computers, never noticed any issues, quite the opposite (unless you use slow DNS servers), not to mention the security benefits.
     
  8. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,066
    10
    #211 shewolf, Mar 5, 2018
    Last edited: Jan 29, 2019
    Access to this post is restricted!
    You're trying to open the post, written by @shewolf,
    but unfortunately it was marked as a draft (by the user himself or the UFO)

    that's all .:rolleyes:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,066
    10
    #212 shewolf, Mar 5, 2018
    Last edited: Jan 29, 2019
    Access to this post is restricted!
    You're trying to open the post, written by @shewolf,
    but unfortunately it was marked as a draft (by the user himself or the UFO)
    :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. lomticksoftoast

    lomticksoftoast MDL Member

    Nov 12, 2009
    189
    143
    10
    Thanks. I used to disable DNS Cache service, but it 'borked' connecting to other PCs on my LAN. Does this still happen on Windows 10? Is there a work-around to address this problem?
     
  11. lomticksoftoast

    lomticksoftoast MDL Member

    Nov 12, 2009
    189
    143
    10
    #214 lomticksoftoast, Mar 6, 2018
    Last edited: Mar 6, 2018
    Here it is:
    (I doesn't make sense to link it directly to WUMT since it requires a reboot.)
    Paste the following script into notepad and add .cmd to the end of the script name
    Name it whatever you want. WUToggle.cmd or shewolf.cmd or WhyDoesMSHateUs.cmd​
    Code:
    @ECHO OFF
    CD /D "%~dp0"
    CHCP 437 >NUL
    COLOR 1F
    
    SET "params=%*"
    cd /d "%~dp0" && ( IF EXIST "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || (cmd /u /c ECHO SET UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~dp0"" && ""%~0"" %params%", "", "runas", 1 > "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
    ::====================================================================
    
    SETLOCAL EnableExtensions
    SETLOCAL EnableDelayedExpansion
    
    SET "Root=%~dp0"
    SET "TIMEOUT3=Timeout /t 3 /nobreak >NUL"
    
    :MAIN_MENU
    CLS
    SET INPUT=
    ECHO:
    ECHO ===============================================================================
    ECHO                                 Main Menu
    ECHO ===============================================================================
    ECHO:
    ECHO  [1] - Disable the Windows update client component
    ECHO:
    ECHO  [2] - Enable the Windows update client component
    ECHO:
    ECHO  [3] - Restart PC
    ECHO:
    ECHO  [0] - Quit
    ECHO:
    ECHO ===============================================================================
    ECHO:
    SET /P INPUT= ^> Enter Your Selection:
    IF [%INPUT%]==[] ECHO.&ECHO Invalid Selection&ECHO.&PAUSE&GOTO :MAIN_MENU
    IF %INPUT% gtr 3 ECHO.&ECHO Invalid Selection&ECHO.&PAUSE&GOTO :MAIN_MENU
    
    IF %INPUT%==1 GOTO :DISABLE_WU
    IF %INPUT%==2 GOTO :ENABLE_WU
    IF %INPUT%==3 GOTO :Restart
    IF %INPUT%==0 GOTO :QUIT
    GOTO :eof
    
    :DISABLE_WU
    CLS
    ECHO:
    REG QUERY "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "DisableWindowsUpdateAccess"
    ECHO:
    CHOICE /C:YN /N /M "Is 'DisableWindowsUpdateAccess' set to REG_DWORD [0x1]? ['Y'es/'N'o] : "
    IF %ERRORLEVEL% EQU 2 (
    ECHO --- Disabling Windows update client component ---
    REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "DoNotConnectToWindowsUpdateInternetLocations" /t REG_DWORD /d 1 /f >nul
    REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "DisableWindowsUpdateAccess" /t REG_DWORD /d 1 /f >nul
    REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "UseWUServer" /t REG_DWORD /d 1 /f >nul
    %TIMEOUT3%
    ECHO:
    GOTO :Restart
    )
    CLS
    ECHO You've already disabled the Windows update client component
    %TIMEOUT3%
    GOTO :MAIN_MENU
    ::-------------------------------------------------------------------------------------------
    
    :ENABLE_WU
    CLS
    ECHO:
    REG QUERY "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "DisableWindowsUpdateAccess"
    ECHO:
    CHOICE /C:YN /N /M "Is 'DisableWindowsUpdateAccess' set to REG_DWORD [0x0]? ['Y'es/'N'o] : "
    IF %ERRORLEVEL% EQU 2 (
    ECHO --- Enabling Windows update client components ---
    REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "DoNotConnectToWindowsUpdateInternetLocations" /f >nul
    REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "DisableWindowsUpdateAccess" /t REG_DWORD /d 0 /f >nul
    REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "UseWUServer" /f >nul
    %TIMEOUT3%
    ECHO:
    GOTO :Restart
    )
    CLS
    ECHO You've already enabled the Windows update client component
    %TIMEOUT3%
    GOTO :MAIN_MENU
    ::-------------------------------------------------------------------------------------------
    
    :Restart
    CLS
    CHOICE /C:YN /N /M "Do you want to restart now? ['Y'es/'N'o] : "
    IF %ERRORLEVEL% EQU 2 (
    ECHO:
    ECHO Remember, you must restart before the changes will take effect!
    ECHO:
    PAUSE
    GOTO :MAIN_MENU
    )
    CLS
    shutdown /r
    ECHO:
    %TIMEOUT3%
    GOTO :QUIT
    
    ::====================================================================
    :QUIT
    CLS
    COLOR 1C
    ECHO:
    ECHO Exiting...
    %TIMEOUT3%
    ENDLOCAL EnableExtensions
    ENDLOCAL EnableDelayedExpansion
    COLOR 00
    EXIT
     
  12. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
    This just looks to me that it wouldn't work with 10 Home. I haven't tried it yet though.
     
  13. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,066
    10
    #216 shewolf, Mar 6, 2018
    Last edited: Jan 29, 2019
    Access to this post is restricted!
    You're trying to open the post, written by @shewolf,
    but unfortunately it was marked as a draft (by the user himself or the UFO)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
    Then don't use my script.
     
  15. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,066
    10
    #218 shewolf, Mar 6, 2018
    Last edited: Jan 29, 2019
    Access to this post is restricted!
    You're trying to open the post, written by @shewolf,
    but unfortunately it was marked as a draft (by the user himself or the UFO)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
    You can warn everyone of how horrible my script is all you want, but my script works on any version of windows 10 and your methods that you change every day are not proven.
    I'd say it's you who doesn't know what he's doing:
    First, you said it was:
    netsh advfirewall firewall add rule name="Block Windows Update" dir=Out action=Block program="C:\Windows\System32\svchost.exe" service=wuauserv protocol=TCP remoteport=80,443
    Then later you said it was:
    netsh advfirewall firewall add rule name="Block Windows Update" dir=Out action=Block program="C:\Windows\System32\svchost.exe" protocol=TCP remoteport=80,443
    And now after @rpo wrote a great script based on that (and you had to correct him on the firewall rule he used because you couldn't make up your mind on which version was correct), now you're saying it's:
    Code:
    --- Disable the Windows update client component ---
    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "DoNotConnectToWindowsUpdateInternetLocations" /t REG_DWORD /d 1 /f
    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "DisableWindowsUpdateAccess" /t REG_DWORD /d 1 /f
    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "UseWUServer" /t REG_DWORD /d 1 /f
    
    --- Reverse -  Enable the Windows update client component ---
    reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "DoNotConnectToWindowsUpdateInternetLocations"
    reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "DisableWindowsUpdateAccess"
    reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "UseWUServer"
    I'm done with this discussion, seriously. You're wasting everyone's time. You're not responsible for what I do with WUMT, nor do you have any say in what I do with it. This is my script that I wrote for myself with help from others as it gained momentum and I really don't care if nobody uses it but me. I made a project and a thread about the project. So make your own thread called "The WUMT Wrapper script will trash your computer." and make a project out of telling everyone not to use my script. Do whatever you have to do shewolf. Attack me. Call me names. I mean, since you already are anyway.
     
  17. lomticksoftoast

    lomticksoftoast MDL Member

    Nov 12, 2009
    189
    143
    10
    I woke up this morning thinking, "Maybe I should move the script I wrote off this thread" ...
    It looks like I'm, once again, "late to the party" ...
    My other "morning thought" was ...
    I still think that there is a potential advantage using the OP, thread owner, pf100's solution over other proposed solutions.
    Namely: Fewer CPU cycles.
    pf100's script stops additional Windows Update applications from running.
    Other proposed solutions allow remsh.exe and usoclient.exe to still--perhaps frantically--attempt to get Windows Update to work. Potentially consuming CPU cycles and thrashing the hard drive.
    Is this a real thing or am I presenting "Fake News"?