Sledgehammer - Windows 10 Update Control

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

  1. aerystr43

    aerystr43 MDL Novice

    Oct 12, 2013
    1
    4
    0
    I'm glad you are recovering. I just wanted to let you know that I greatly appreciate you excellent work. :)
     
  2. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,447
    90
  3. Smiglo5

    Smiglo5 MDL Novice

    Jul 8, 2018
    37
    3
    0
  4. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,447
    90
    With version 2.7.0 the script doesn't check the internet connection with "ping" anymore so the check shouldn't be blocked by anything now.
     
  5. MagicRobotNinja

    MagicRobotNinja MDL Novice

    Jul 31, 2019
    1
    0
    0
    So I've mainly just been creeping and only signed up for more in-depth info in case I need it. Which I have and greatly appreciate all who have offered up ideas and solutions. Now this post is not regarding anything "sledgehammer" really, just praise to an awesome community striving to keep a serious PIA in check.

    Glad to hear you've recovered @pf100 as your script, well, it's a lifesaver. I'd much rather find a version works for me and tell M$ to shut up! This does just that - instant install on any new computer. Keep it up and don't be afraid of pitchforks or torches if you decide to move on, either, I got your back... ;)

    Peace out all - Stay safe an all that
    MRN
     
  6. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,331
    7,047
    210
    The check for Defcon seems to sometimes fail in a weird way. There should be either a Defcon value or an error message, but, in the weird case, nothing is shown at all.

    I see two possibilities:
    1. It truly fails to print the value to the window, or
    2. it prints the value, but the help text below causes it to scroll down too far, so it vanishes.

    I hope I can capture it when that happens again.
     
  7. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,447
    90
    Let me know if you find out what's going on because I've never had the defcon check fail on me.

    #1 is a possibility since the whole ms-defcon status in the script is a hack that scrapes the text on the askwoody site. I asked Woody if he had the defcon value somewhere set as a value I could grab to display, but no, I have to do it the hacky way. I never thought I would actually get that working. It's possible that some weird internet latency could be causing a problem but other than that I can only guess at this point without more info. I could implement some sort of error check and do retries or figure something else out if this keeps happening to you. Next time it happens, see if the askwoody site is working for you but I assume it is or you would have mentioned that.
    You can try doubling the timeout setting for scraping the site by changing line 137's "-TimeoutSec 10" to "-TimeoutSec 20". Let me know if that helps.

    #2 is not likely since I do everything I possibly can to make sure that things that scroll can't push things off the screen.
     
  8. BraneStawm

    BraneStawm MDL Novice

    Apr 14, 2020
    37
    13
    0
    Hi There pf100 - I'm new to sledgehammer having only found it recently whilst upgrading the WUMT wrapper script. I have a few questions. I have seen the errors when running the SFC command but when I uninstall, they are still there. I take it the recovery command is supposed to fix that? (FYI- as I had a backup I ran it without going into repair mode and it still worked and fixed the files that were showing errors) Is this a bad idea?

    Also, the programs related to the update hijacker, there is one called 'WaaSMedic.exe' but on my system the file is called 'WaaSMedicAgent.exe'. Does your program still do it's magic on this file?


    Many thanks for all the effort you must have put into this. It's a great help
     
  9. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,447
    90
    The recovery script is for emergency recovery in case the computer refuses to boot and you want to make sure the Sledgehammer script isn't the problem, but running it won't hurt anything although it doesn't do a complete uninstall of the script like the uninstaller script does. If I'm understanding you correctly, and the recovery script is fixing the sfc errors but the uninstall script isn't, I've never heard of that happening before and I'm not sure how that could happen because the uninstaller script is more thorough than the recovery script.

    Send me this file (preferably after getting SFC errors after uninstall) and I'll see if I can figure out what's going on:
    Code:
    X:\Windows\Logs\CBS\CBS.log

    WaaSMedicAgent.exe doesn't need to be disabled because the script disables WaasMedicSvc.dll, WaaSMedicPS.dll, and WaaSAssessment.dll which prevents WaaSMedicAgent.exe from doing anything.
     
  10. BraneStawm

    BraneStawm MDL Novice

    Apr 14, 2020
    37
    13
    0
    Many thanks for the fast response pf100.
    The next time I uninstall sledgehammer I will post the cbs.log if it has the errors or will let you know if it is clear.

    Thanks for the reassurance on WaaSMedicAgent.

    PS. It's a sweet tool
     
  11. BraneStawm

    BraneStawm MDL Novice

    Apr 14, 2020
    37
    13
    0
    #1451 BraneStawm, Apr 16, 2020
    Last edited: Apr 16, 2020
    OK, Good news. I uninstalled sledgehammer and ran SFC again, this time there were no errors. I can only put this down to the fact that I did not uninstall WUMT_Wrapper_Script prior to installing SH the first time, although I uninstalled them both prior to running SFC (when I got the errors) I guess there must have been some kind of conflict.

    Anyway, that'll teach me to read the instructions!!

    Many Thanks for your help
     
  12. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,447
    90
    That would explain it.
     
  13. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,331
    7,047
    210
    I had a chance to capture one situation where the script failed to get any DefCon score from the AskWoody site and failed without an error message. This was on the 19608.1000 build:

    sledgehammer270_askwoodybutnoanswer.jpg
     
  14. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,447
    90
    At the end of line 137 of Sledgehammer.cmd, add a quote to the end of the line (this is not the full line shown)

    so that this
    Code:
    MS-DEFCON = \"+$x.split('/')[8].split('.')[0].SubString(10,1);break}}
    looks like this
    Code:
    MS-DEFCON = \"+$x.split('/')[8].split('.')[0].SubString(10,1);break}}"
    Let me know if that fixes it.
     
  15. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,331
    7,047
    210
  16. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,331
    7,047
    210
    I'll have a looksie, then.
     
  17. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,331
    7,047
    210
    #1459 Carlos Detweiller, Apr 20, 2020
    Last edited: Apr 20, 2020
    No dice. Maybe something specific to the system? Will have to clean-install to a test VM and re-check.

    Edit: Set up a new 19608 VM and tested, with the same outcome. Unless it's something with VBox, the build has issues.
     
  18. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,447
    1,421
    60