Sledgehammer - Windows 10 Update Control

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

  1. pf100

    pf100 MDL Expert

    Oct 22, 2010
    1,945
    3,157
    60
    1. Yes. No.
    2. Yes.
     
  2. jinbill

    jinbill MDL Novice

    Oct 21, 2018
    14
    4
    0
    does it matter if the other users are standard or admin? what if the users accounts are created after sledgehammer is installed/executed?
     
  3. pf100

    pf100 MDL Expert

    Oct 22, 2010
    1,945
    3,157
    60
    As long as you've run the script once with an admin account, it doesn't matter if other users are standard or admin.
    And it doesn't matter how many or what type of accounts you add after the script has been run. "It just works."
     
  4. zylor

    zylor MDL Junior Member

    Feb 25, 2012
    88
    40
    0
  5. zylor

    zylor MDL Junior Member

    Feb 25, 2012
    88
    40
    0
    Windows Update Blocker was updated to 1.6 from sordum.org. They added a lot of options and switches. Maybe its worth updating in the upcoming version of sledgehammer?
    changelog of it:
    Nsudo was also updated to 8.2 and so on.....

    WUMgr isn't blocking updates on latest version of windows for some reason
     
  6. Whistler4

    Whistler4 MDL Member

    Jul 30, 2015
    182
    174
    10
    #1846 Whistler4, Aug 6, 2021
    Last edited: Aug 25, 2021
    I'd be happier if one of the changes would finally stick it in the system tray so you could get a constant monitor showing whether blocking is on or off. Oh, well . . . Service tray works for that part once you have its scheduled task worked out.
     
  7. pf100

    pf100 MDL Expert

    Oct 22, 2010
    1,945
    3,157
    60
    The versions included with the script do everything needed. Windows Update Blocker will be updated in the next version, but not to version 1.6. Upgrading stuff just to increase the version number when there is no benefit makes no sense.
    That has nothing to do with the script or how well the script blocks updates.
     
  8. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,205
    1,072
    60
    @pf100 :
    I'm doubtful when looking at statements like :
    Code:
    CHOICE /C D1234 /M "Your choice?:" >nul 2>&1
    because error and text are redirected tu NUL, so Your choice?: is not displayed. Just remove >nul 2>&1 from this statement.
    PS : I hope everything is OK with your health.
     
  9. Whistler4

    Whistler4 MDL Member

    Jul 30, 2015
    182
    174
    10
    Perhaps this is already well-known, but WuMgr under Sledgehammer won't display any updates if you've paused updates with the Windows 10 Settings. After AskWoody gave the all clear for August updates, I just noticed that a couple of my computers came up with blank updates available in WuMgr. While still running WuMgr, I checked the Windows 10 Update Settings and found that I'd forgotten I had paused updates until August 31. So I clicked "Resume" to fix that issue.

    (Sledgehammer prevents the Windows 10 Update Settings screen from displaying, so the check needs to be done while Sledgehammer is enabling the service. I had paused the updates last month in between installs of Sledgehammer while I was performing other maintenance.)

    Clipboard01.jpg
     
  10. pf100

    pf100 MDL Expert

    Oct 22, 2010
    1,945
    3,157
    60
    #1851 pf100, Aug 26, 2021
    Last edited: Sep 5, 2021
    (OP)
    Thanks for the info. I'll fix that. And my health is priority number 1. I've heard the sad stories of people not making it a priority and either committing suicide or some other horrible thing and I'm going to make sure something like that doesn't happen to me. I don't feel suicidal, I'm just saying mental health is extremely important to me. Thanks for the thoughts.

    Thanks for that info. I didn't know that was a thing because I've never paused updates before because I always use the script on everything. Just off the top of my head I can think of a few options:
    1. When the script is run, force un-pause updates without notification
    or
    2. Check if updates are paused and notify with the option to unpause them

    I did a quick check just now (this could be the wrong key) and it appears that the key to check for paused updates is:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings
    PauseUpdatesExpiryTime

    and maybe an overkill method to force unpause would be
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\PolicyState]
    "IsDeferralIsActive"=dword:00000000
    "PolicySources"=-
    "QualityUpdatesPaused"=-
    "QualityUpdatePausePeriodInDays"=-
    "FeatureUpdatesPaused"=-
    "FeatureUpdatePausePeriodInDays"=-
    "PauseFeatureUpdatesStartTime"=-
    "PauseFeatureUpdatesEndTime"=-
    "PauseQualityUpdatesStartTime"=-
    "PauseQualityUpdatesEndTime"=-
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\Settings]
    "PausedFeatureStatus"=dword:00000000
    "PausedQualityStatus"=dword:00000000
    "PausedFeatureDate"=-
    "PausedQualityDate"=-
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings]
    "PauseFeatureUpdatesStartTime"=-
    "PauseQualityUpdatesStartTime"=-
    "PauseUpdatesExpiryTime"=-
    "PauseFeatureUpdatesEndTime"=-
    "PauseQualityUpdatesEndTime"=-
    I'm putting this here for notes to come back to later.
     
  11. Carlos Detweiller

    Carlos Detweiller MDL Spinning Tortoise

    Dec 21, 2012
    4,704
    4,768
    150
    I'd take number 2. Forcing things without any notification rather is Microsoft's forte.
     
  12. Whistler4

    Whistler4 MDL Member

    Jul 30, 2015
    182
    174
    10
    That does seem to be the key. If "Pause" activation is detected, can you simply notify and bring up the Settings screen to allow user to click "Resume" (then flip back to where you were in the script)? Probably nothing simple about that -- sorry.

    Another alternative if "Pause" is detected and notification made is to instruct user to DIY navigate to Windows 10 Update Settings and click "Resume" then navigate back to WuMgr (or WUMT) and refresh.

    Even simpler, add a notice before running WuMgr that if updates are expected but none are found, leave WuMgr open, ensure Windows 10 Update Settings are not on Pause, and return to WuMgr and click the refresh scan button.
     
  13. pf100

    pf100 MDL Expert

    Oct 22, 2010
    1,945
    3,157
    60
    It would obviously be best to check for paused updates before the script hides the updates page in settings, at the very latest before line 145 in script 2.7.3 rc1a. Line 115 looks like a winner.

    Then show a message (fancy screen not needed, just basic info) to manually go to updates in settings and unpause updates then return and press a specific key to continue which would then just take you to the first normal screen where it says "updates disabled" as it normally does.

    That would be the easiest way to do it. No one is going to pause updates after the script runs the first time anyway until the script is uninstalled so it'll just be a one time deal. Seems like it would be a very minor inconvenience for the user.
     
  14. zylor

    zylor MDL Junior Member

    Feb 25, 2012
    88
    40
    0
    Thanks for your work!
    Hope everything is well with your health! MDL needs ya buddy! Stay strong :cool:
     
  15. Whistler4

    Whistler4 MDL Member

    Jul 30, 2015
    182
    174
    10
    I agree. The only probable time Pause would be used is before installation/first use or in between installs of Sledgehammer. So checking when the script is run the first time should be good enough.
     
  16. =STARBUCK=

    =STARBUCK= MDL Novice

    Dec 14, 2018
    5
    0
    0
    Does sledgehammer work as well with Windows 11? are there any additional differences from 10 in the update mechanism?
     
  17. pf100

    pf100 MDL Expert

    Oct 22, 2010
    1,945
    3,157
    60
    Yes it works fine. Windows 11 is the same as Windows 10 as far as the update structure goes.
     
  18. zucrin

    zucrin MDL Member

    Feb 2, 2011
    165
    118
    10
    no need to go so far, here my Sample.
    its put WU in Notify Mode.

    rem define Policies registry key
    set Key="HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
    REG ADD %Key% /v NoAutoUpdate /t REG_DWORD /d 0 /f
    REG ADD %Key% /v AUOptions /t REG_DWORD /d 2 /f
    REG ADD %Key% /v ScheduledInstallDay /t REG_DWORD /d 0 /f
    REG ADD %Key% /v ScheduledInstallEveryWeek /t REG_DWORD /d 1 /f
    REG ADD %Key% /v ScheduledInstallTime /t REG_DWORD /d 3 /f
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. pf100

    pf100 MDL Expert

    Oct 22, 2010
    1,945
    3,157
    60
    Thanks, but it was decided to not do any of that anyway, and do it manually here.