[WINDOWS_UPDATE_TOGGLE.BAT] Manage updates blocking from the comfort of Desktop context menu

Discussion in 'Windows 10' started by AveYo, May 8, 2018.

  1. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,693
    60
    #1 AveYo, May 8, 2018
    Last edited: Sep 7, 2020
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,693
    60
    #2 AveYo, May 10, 2018
    Last edited: May 14, 2018
    (OP)
    CHANGELOG
    v10.0 final
    - Downloads option: to block all updates from even downloading
    - Service option: not advised as it cripples Store and other stuff
    - Troubleshooter option: disables blocks then launches official diag
    - Generate C:\Windows\WUTUndo.bat to be used if unlikely login fail after update, from advanced startup - troubleshoot - command prompt
    - Apply temporarily disables impeding blocks, then restores them
    - Tons of optimizations for speed and reliability & more safeguards

    v10.0-rc5
    - auto trigger manual defender updates if found on refresh
    - show install list even when pending reboot
    v10.0-rc4
    - improved refresh and pending
    - fix external cmd creating visible windows rc3 bug
    v10.0-rc3
    - no refreshing while pending operations
    - faster setup phase
    v10.0-rc2
    - more reliable install updates context menu entry
    - add automatic refreshing
    v10.0-rc1
    - initial rework
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. bobkush

    bobkush MDL Novice

    May 22, 2017
    21
    44
    0
    I use VirtualBox virtual drives with a Lite customized version of Windows 10 to create portable programs - this batch file makes it easier to disable the updates I do NOT need. Thanks.
     
  4. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,693
    60
    v10.0 final is up, please try it - it really is awesome!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,693
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Puremin0rez

    Puremin0rez MDL Senior Member

    Nov 24, 2010
    267
    161
    10
    What does blocking "Build Upgrades" do? Does this prevent Feature Updates, or Cumulative Updates?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,693
    60
    Only feature upgrades i.e. windows setup - It's more of a safeguard in case it slips through.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. thanks @BAU for this script, i'll test it and will report here how it goes :)
     
  9. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,693
    60
    That's actually not a block, but a temporary toggle on-off for the realtime scan stuff.
    I would not block Service if I were you, as it hinders both Store and Defender.
    How can you tell if Defender updates? Well, you open Defender interface and check the last time it updated
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. freddie-o

    freddie-o MDL Expert

    Jul 29, 2009
    1,375
    2,277
    60
    #11 freddie-o, Dec 2, 2018
    Last edited: Dec 4, 2018
    I'm on Server 2019 so no store, and even with Service blocked, "Check for updates" in Defender still works.
    Sorry, so does WUT schedule Defender updates or do I have to do it manually? Coz normally I update Defender a few times a day either thru a powershell script or Defender itself.
     
  11. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,693
    60
    Check the script - it switches the default source from windows update to mmpc (microsoft malware protection center, now called something else) so it can function with updates disabled.
    It uses the built-in schedules, but sure, you can add your own just fine.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. loveleeyoungae

    loveleeyoungae MDL Novice

    Sep 26, 2011
    25
    19
    0
    Don't know why it's not popular. This script is actually great for those who want a method that doesn't change permissions, i.e. I consider this a "untouched" method. IFEO is a smart thing. Thanks OP!
     
  13. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,693
    60
    Yet it clearly blocked the installs - it did it's primary job.

    I don't know what's on your system and if you used other solutions, or if you attempted to run WUT while the system was trying to update in the background with TrustedInstaller process running. Thing is windows does not give up easily in that scenario of having updates already in the queue, with a dirty SoftwareDistribution folder.
    Once you restart or TrustedInstaller timed out, then downloads should not happen anymore.

    The way I envisioned WUT is to keep default settings i.e. not block Downloads as there are downsides to doing that, and instead Hide updates you don't want via the update lists menu (you have Lists disabled). That makes Windows stop bothering you about those - no more downloads, not now, not in the future - but just for those specific updates - and if you hide all of the pending updates via the right-click Hide list windows will show as up to date in settings and security center.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. trashman01X

    trashman01X MDL Novice

    Oct 10, 2019
    6
    3
    0
    The computer was offline. ethernet cable disconnected before I did anything

    Prior to this I was using the sledgehammer script from pf100, and that downloads/install list there was totally empty.,

    I used his uninstall script. and then ran your BAT file which added the right click context menu
    after that was done I went and connected my ethernet cable back up to the PC.

    I went to the updates settings in windows and STRAIGHT away i see its starting downloads for those updates.
    It was actually downloading them. (even tho your script says downloads are off)

    your script must have some vulnarability because it did allow windows to start downloading the updates.
    I do not want it ever downloading them without my permission.

    I'm not sure if you've ever tested this with LTSC but I am using LTSC. do you think it makes a difference?
    thanks.
     
  15. sungerbob

    sungerbob MDL Junior Member

    Nov 8, 2014
    58
    11
    0
    Hey, thank you for making this script.
    I want to add extra services to context menu like DoSvc(Delivery Optimization), WaaSMedicSvc(Windows Update Medic Service), BITS(Background Intelligent Transfer Service), UsoSvc(Update Orchestrator Service). Is it possible to add them on script? I tried but I got no luck for it :(

    1-) I tried same entry in script like wuauserv but it didn't change depending service :(
    Code:
    :dosvc
    echo %0 %*
    for /f "tokens=3" %%# in ('sc qc DoSvc^| find /I "WUTblocked"') do set "blocked=%%#"
    if /i "%blocked%"=="rpcss[WUTblocked]" (set "blocked=rpcss" &set "toggle=39") else set "blocked=rpcss[WUTblocked]" &set "toggle=38"
    reg add "%menu%\9Dosvc"  /v Icon /d "ieframe.dll,%toggle%" /f %.%
    net stop wuauserv /y %.%
    for /f "tokens=3" %%# in ('sc queryex DoSvc ^| find /i "PID"') do set "pid=%#"
    if not "%pid%"=="0" taskkill /pid %pid% /f %.%
    sc config DoSvc type= share depend= %blocked% %.%
    if defined block start "wut" wscript /e:JScript "%f0%" WUTRefresh
    exit/b
    2-) I tried same entry in script like TrustedInstaller but I got same result as wuauserv :(
    Code:
    for /f "tokens=3" %%# in ('sc qc DoSvc ^| find /I "WUTblocked"') do set "blocked=%%#"
    if /i "%blocked%"=="[WUTblocked]" (set "blocked=/" &set "toggle=39") else set "blocked=[WUTblocked]" &set "toggle=38"
    reg add "%menu%\9Dosvc"  /v Icon /d "ieframe.dll,%toggle%" /f %.%
    net stop DoSvc /y %.%
    for /f "tokens=3" %%# in ('sc queryex DoSvc ^| find /i "PID"') do set "pid=%#"
    if not "%pid%"=="0" taskkill /pid %pid% /f %.%
    sc config DoSvc type= own depend= %blocked% %.%
    if defined block start "wut" wscript /e:JScript "%f0%" WUTRefresh
    exit/b
    3-) I tried call flip function in script but I got same result like wuauserv :(
    Code:
    echo %0 %*
    call :flip DoSvc 9Speech
    for %%# in (%dosvc%) do if defined block ( reg delete "%ifeo%\%%#.exe" /f %.% ) else (
     reg add "%ifeo%\%%#.exe" /v Debugger /d "%noop%" /f %.% &taskkill /im "%%#.exe" /t /f %.%
    )
    exit/b
    I suck at coding so can you help me about that? I really appreciate it.
     
  16. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,693
    60
    you probably did it ok, but the issue is there is no more space for entries!
    and that's because of an absolutely retard microsoft limitation of max 16 entries total per each context menu via registry!
    we are entering year 2020 and this s**t still stands like in windows 1.x...

    I do have a more recent not publicly shared v1.2 of the script that featured code to easily add extra ifeo and service blocking toggles into a new root entry (again, max of 16 toggles).
    Will update here later after I sanitize it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. crypticus

    crypticus MDL Senior Member

    Jun 29, 2015
    317
    142
    10
    how can i remove this


     
  18. NST_Adventure

    NST_Adventure MDL Addicted

    Jun 1, 2019
    912
    208
    30
    Thank You @BAU ! :) ;)
    But do you think with this i can disable updates forever?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...