Sledgehammer - Windows 10 Update Control

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

  1. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,440
    1,420
    60
    I got news from the developper some months ago. He is not going well.
     
  2. Whistler4

    Whistler4 MDL Member

    Jul 30, 2015
    204
    192
    10
    Sorry to hear that news. Thanks for posting it. Here's to the good health of @pf100 !
     
  3. ffereira

    ffereira MDL Novice

    Oct 14, 2016
    1
    0
    0
    Sorry to hear. Is there anything we can do to help?
     
  4. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,440
    1,420
    60
    The develloper is doing ok now, but his life has changed. He is willing to turn the project to someone else. Any volunteer?
     
  5. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    3,702
    5,104
    120
    I volunteer you :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. VDev

    VDev MDL Member

    Sep 9, 2015
    109
    57
    10
    +1 to rpo.
     
  7. Dave Schaack

    Dave Schaack MDL Novice

    Mar 4, 2021
    8
    4
    0
    I am afraid that Microsoft may have found a way around Sledgehammer. I'll be the first to admit that I don't know what I am doing here, but consider my story.

    I have to start with a bit of background. In 2022 I purchased two used Dell laptops (Inspiron 3195) to serve together with one I already had. These three computers were then each set up to be single-purpose data acquisition computers, running applications that I wrote. I did not want Microsoft to screw up my setups, so I installed Sledgehammer to prevent updates. Unfortunately, perhaps, I did not disable the WDU task within Sledgehammer, even though I really don't care about internet dangers with these 3 computers. They were cheap, and there is nothing of value to anyone else on them.

    Now I know that Sledgehammer was not intended to prevent updates forever, but it was the only option I was aware of. It worked well for quite a while.

    Only one of the computers runs an application that inherently accesses the internet. I ran that computer successfully for several months in 2022, without shutting the computer down. When I started it up again in May, it also ran successfully for some weeks. Then I noticed a problem (I don't remember what) so I signed out and signed in again. Windows did a quick update! That update did not cause any apparent problem with my work.

    However, in mid to late June, there were two more Windows updates that occurred when I signed out or shut down to address difficulties. The computer is now running version 22H2, when originally it was running something from 2020. And the latest update broke my application, just as I had feared it would.

    Today, I decided to set up another one of the computers with that application to get it back on the air. I had not used that computer for a long time, so I first checked Task Manager to look at when Sledgehammer had last been run. It was some time in September, 2022. So I rebooted to get Sledgehammer to run again before I started modifications. Even though the computer was not connected to the internet, and had not been for months, Windows did an update!

    Not much of an update, because this system is still running 21H2. However, when I checked the status of Sledgehammer in Task Scheduler, the LockFiles task had failed! My impression is that this small update is the same thing that I first experienced on the other computer, and I think it may be directed against Sledgehammer.

    To try to figure out why LockFiles failed, I commented out the first line "whoami ..." and the final "exit" command and ran LockFiles from the Administrator command line. Lots of failures there, but since I don't know what I am doing, they might well be from something I have done wrong. In particular, I did not comment out the line "cd /d "%~dp0" since I have no idea what that does.

    So, rather than simply including the output here, I will wait for any responses about what I should have done instead. Yes, I now realize that I should have been signing out or rebooting regularly ...
     
  8. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    3,702
    5,104
    120
    If anything fail ...
    You can always try the group policy way
    Until now it still working..
    Hope Ms will not ruined it .
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Whistler4

    Whistler4 MDL Member

    Jul 30, 2015
    204
    192
    10
    Have you tried running the Sledgehammer script (or shortcut if you used Windows Installer to setup Sledgehammer) periodically? That's supposed to setup the various tasks, permissions, etc., and I think it can reset things so Sledgehammer works as intended . . . at least, through 22H2, which is what I'm using. One of the script windows will tell you when that action is complete and tell you you can close the window without going through any other options. Just my two cents, in case it's that simple.
     
  10. Dave Schaack

    Dave Schaack MDL Novice

    Mar 4, 2021
    8
    4
    0
    These computers originally came with Windows 10S, which could be upgraded to Window 10 Home. Good enough for my purposes, but if I had known about it, I might have purchased the Pro versions.
     
  11. Dave Schaack

    Dave Schaack MDL Novice

    Mar 4, 2021
    8
    4
    0
    Hopefully, that will work going forward. However, right now I need to figure out what Microsoft has done, or reset everything to the original installation. Tried that today on the first computer I discussed; unfortunately I bought it from a computer dealer, and he evidently installed Win 10 without including an original image. After 3 hours, ended up back at 22H2. So that one is now useless for its original purpose.
     
  12. Whistler4

    Whistler4 MDL Member

    Jul 30, 2015
    204
    192
    10
    Don't forget to use the uninstaller.cmd or uninstall start menu shortcut to undo all the changes Sledgehammer makes before trying to "fix" Windows or using other update blocking methods.
     
  13. Dave Schaack

    Dave Schaack MDL Novice

    Mar 4, 2021
    8
    4
    0
    Did that on the second computer, after I discovered that the LockFiles script had failed. Uninstalled, then reinstalled. Same result.

    Also, I now realize that rolling back to the original windows installation is not going to get me anywhere. Original installation is Win 10S. Upgrade that to Win 10 Home, and I will get the latest version. So I either undo what Microsoft did here, fix the application problem caused by 22H2, or simply stop using that application.
     
  14. Whistler4

    Whistler4 MDL Member

    Jul 30, 2015
    204
    192
    10
    Assuming you don't have a previous Win 7 Pro/Ultimate or 8.1 Pro that is transferable and you can use to upgrade to Win 10 Pro, maybe there's a workaround you can find to get to group policy settings on Win 10 Home. MakeUseOf website has an interesting article called "How to Access the Group Policy Editor in Windows Home." (I don't have any personal experience with that advice, though.) Additionally, there are other utilities that block WU, for example, Windows Update Blocker. But if you mix methods, you can wind up with lots of unnecessary troubleshooting.
     
  15. Dave Schaack

    Dave Schaack MDL Novice

    Mar 4, 2021
    8
    4
    0
    Additional Information: I installed Sledgehammer on the system that is now running a fresh copy of Win 10 22H2 (build 19045.2965). The LockFiles task FAILED. I don't think that I am going to be the only one affected by this.

    My original computer of the set of 3, not previously mentioned here, is still running Win 10 Ver. 2004 from 2020. However, when I checked Task Scheduler, the last time that Sledgehammer was run was on 3/6/2023. And LockFiles FAILED then. Since I did use the internet pretty heavily during April and May on that computer, I am pretty sure that it is set up for a large Windows update the next time I reboot it.
     
  16. Whistler4

    Whistler4 MDL Member

    Jul 30, 2015
    204
    192
    10
    #2036 Whistler4, Jul 12, 2023
    Last edited: Jul 12, 2023
    For me, using Sledgehammer Version 2.7.3 rc1a, the LockFiles task completes with 0x1 when I log off Windows 10 Pro 22H2 and back on again (screenshot). Otherwise, Sledgehammer is doing it's job blocking WU except for running WuMgr when I manually update every month. What Sledgehammer version are you using?

    If you're concerned Windows Update will update you the next time you reboot, why don't you run Sledgehammer now, select WuMgr (option 1), and just hide the updates that are presented that you don't want?
    LockFiles Task Run Result.jpg
     
  17. Whistler4

    Whistler4 MDL Member

    Jul 30, 2015
    204
    192
    10
    Check out @pf100 post https://forums.mydigitallife.net/th...-10-update-control.72203/page-96#post-1708231 and the next handful where he recommends changing the last line of LockFiles.cmd from "exit" to "exit /b 0"

    (Or search thread only for LockFiles.)

    @pf100 said that should have been there all along to force an exit code of success.

    LockFiles Task Run Result2.jpg (New screenshot after editing with exit /b 0)
     
  18. Dave Schaack

    Dave Schaack MDL Novice

    Mar 4, 2021
    8
    4
    0
     
  19. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,440
    1,420
    60
    Congrats! It seems you are the volunteer to maintain Sledgehammer.
     
  20. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,440
    1,420
    60
    The whoami command is used to test that le task is running under the system account, if not the task exits. Hence you can't run from a command line. The task is designed to run with max privileges. (<RunLevel>HighestAvailable</RunLevel>). Exiting the task with exit /b 0 masks a possible failure of the running task.
    The command "cd /d "%~dp0" sets up the current working directory and is mandatory for runnig the task (it permits to find ndudo, etc...). The value of the directory is the directory from which the task is executed.