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
    Instead of maintaining different version of the script testing the windows buidnumber could make it possible to bypass unnecessary coding :
    Code:
    rem Get Windows OS build number
    for /f "tokens=2 delims==" %%G in ('wmic path Win32_OperatingSystem get BuildNumber /value') do (
      set /a WinBuild=%%G
    )
    (for windows 7 = 7601)
     
  2. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,447
    90
  3. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    7,897
    10,733
    240
    yay but now all issues is very very more frequent with W10 Systems so... ah! only remembering you and pf100 thinks over all "unespected behaviours inside of WU or WUSA or I'am wrong bro you are the man +pf100 related to this section inside of newWindows O.S maybe ous need rewrite code for !W10 works CORRECT?:rolleyes:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,447
    90
    #464 pf100, Jun 14, 2018
    Last edited: Jun 15, 2018
    (OP)
    That would be the best way to do it. "If not Windows 10, don't disable files." Everything else would remain unchanged as far as I know.

    Edit: On second thought, what's wrong with the latest script? It just runs a lot of unnecessary code but is otherwise harmless to windows 7.
    It doesn't disable any files that I know of as is, so it has all the benefits without any real drawbacks. What are your thoughts on this?
    Never mind.
     
  5. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    7,897
    10,733
    240
    yep pf100 correct of is right
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,440
    1,420
    60
    Yes, no need to bypass code trying to process files which don't exist!
    Sometimes i run a W7 ultimate in a Virtualbox. The av program is Microsoft Security Essentials and the service name is MsMpSvc - and not windefend - (afaik defender wasn't free with w7) : even if wuauserv is stopped and disabled, definitions updates can be done.
    But, in any event, i would apply what i said in post 458 (and this is what i do).
     
  7. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,447
    90
    #467 pf100, Jun 14, 2018
    Last edited: Jun 15, 2018
    (OP)
    I understand what you and everyone else is saying now. I'll make a new version based on your post just for Windows 7.
    I know you're saying that's not necessary but I don't mind. Thanks.

    Edit: @rpo, I edited what you posted here with the wub.exe check code in case someone copies this over a newer version and am using it as the core for v2.1.7.7 for Windows 7,
    as shown below:
    Code:
    @echo off
    if exist "%~dp0wub.exe" if exist "%~dp0wub.exe-backup" del "%~dp0wub.exe-backup" /f /q >nul 2>&1
    ren "%~dp0wub.exe-backup" wub.exe >nul 2>&1
    "%~dp0wub.exe" /e
    for /f "tokens=2 delims==" %%a in ('wmic cpu get AddressWidth /value') do (set arch=%%a)
    IF %arch% == 32 (set "wumt=%~dp0wumt_x86.exe") else (set "wumt=%~dp0wumt_x64.exe")
    Start "" "%wumt%" -update "-onclose %~dp0wub.exe /d /p"
    
     
  8. lewcass

    lewcass MDL Senior Member

    Mar 10, 2018
    429
    251
    10
    v2.1.7 works fine and i always check that windows update is disabled when i close the tool, no problems yet. I prefer to have a single version of a tool that works on every os i use. I havnt put 236 onto an online system yet but i plan to in the next few weeks, or a newer version if its out. :)


    Thanks for your input guys, i will be coming back to this in a few weeks, gotta loton :(
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. lewcass

    lewcass MDL Senior Member

    Mar 10, 2018
    429
    251
    10
    #471 lewcass, Jun 15, 2018
    Last edited: Jun 16, 2018
    @pf100 and Skunk1966, v217 works, but under these conditions. I use 2 different w7 configurations,

    1 - Original iso updated with kb3125574 and its preprequisites, and .net 472.
    2 - Original iso updated with kb3125574 and its preprequisites, .net 472, updates up to dec 2016 or the month before ms started blocking updates on certain systems.

    Under these 2 circumstances 217 works fine but it may not if ms sneakily changed things since then.

    I dont use the script to its full capability either. I only use WU with the script, never on its own. When i do use it is only on a test install to check for updates. I browse the updates, cherry pick what i want then save the download links and manually download them. Then i add them to the install one at a time. If it breaks something, i discard it. If its ok then i save it so i can either slipstream it or add it to the oems folder to install during setup. Repeat as necessary.

    So far i only use the windows update option but i may start doing it all in offline mode so i can download it all from Linux. :)

    The script is one of the most valuable tools in my armoury. :worthy:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. lewcass

    lewcass MDL Senior Member

    Mar 10, 2018
    429
    251
    10
    #472 lewcass, Jun 16, 2018
    Last edited: Jun 16, 2018
    Ive copied the code for 2.1.7.7 and will give it a try soon. Because i dont use it or WU to download or update the system i will stick to 2177 instead. I will bake it into iso's and dvd's so its always availible.

    Thank you pf100. :)

    Ive added the new cmd file into my 217 pack and renamed it to 2177. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. lewcass

    lewcass MDL Senior Member

    Mar 10, 2018
    429
    251
    10
    When i finally switch to windows for my workstation and linux for online work then i wont have to worry about keeping windows up to date.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. lewcass

    lewcass MDL Senior Member

    Mar 10, 2018
    429
    251
    10
    Dont forget to disable and remove(optional) ceip(and related) scheduled tasks, just in case.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Skunk1966

    Skunk1966 MDL Member

    Jul 15, 2011
    156
    145
    10
    Don't worry I've done all that + more
     
  14. lewcass

    lewcass MDL Senior Member

    Mar 10, 2018
    429
    251
    10
    Care to share the "more"?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Skunk1966

    Skunk1966 MDL Member

    Jul 15, 2011
    156
    145
    10
    I'll look for my file and send you the link to the file by pm (it's a .doc file with all steps and list of updates to avoid in windows 7/8/8.1)
     
  16. lewcass

    lewcass MDL Senior Member

    Mar 10, 2018
    429
    251
    10
    Thank you :worthy: I am in no rush with tons of things to do so as and when you can will be great, thanks again. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. Lars220

    Lars220 MDL Novice

    Jun 18, 2018
    38
    56
    0