Sledgehammer - Windows 10 Update Control

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

  1. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    Fwiw, Estado (Spanish word) means State. Sorry if I didn't mention before.
     
  2. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
    No worries, I google translated it as soon as I saw that word.
     
  3. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
  4. #404 Deleted member 1032214, May 14, 2018
    Last edited by a moderator: May 14, 2018
    thank you @pf100 :worthy::hug2:

    edit - wdu task is working very fine. i changed my clock to see how it behaves if task is skipped, and it worked perfectly as expected.

    edit 2 - if you set your clock in next 3 or 4 more days, in that case windows automatically change signature update source to mmpc and use 4.72 MB bandwidth in update check , maybe bcoz normal update source can not work if clock is set to different. its not a problem in anyway for anyone but just seem like a interesting point so i posted it. :)
     
  5. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    7,897
    10,733
    240
    Hi bro sorry for delay is that this dawn I'm making fresh install of W10 Enterprise ok then I need download your script and I can show my results; still thanks for your big effort congrats :) in time state=estado :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
    Thank you. The next release won't be today. @rpo wrote some code for me that saved my butt. Now I have to finish up the parts I can do myself and I only have a few hours before I have no free time for a day at least. If you want what will basically be the next version of the wrapper script (v2.3.0), use v2.2.9 with WDUcreate.vbs here that creates Windows Defender daily update task. If you don't use Windows Defender don't use WDUcreate.vbs because it'll use a lot of bandwidth updating Defender for no reason. I still have to modify the script to detect if Defender is running so that it won't update if it's not.
     
  7. WDUcreate.vbs at first it didnt let me close itself and cancel and close button didnt work. had to go to task manager to kill the process.
    next, i dont see any usefulness in ability to set time, bcoz defender doesnt have any fix time to release update,so even if user set time, it doesnt mean user is going to receive update that time bcoz defender can release updates any time every 1 or 2 days. and task already runs after every 24 hours, as soon as it find user is connected to internet.so i think any default time should be enough.
    but again, take it as a random feedback, and use your best decision.
    now windows update folder seems cluttered and i think it needs to be trimmed down a bit.
    i think every file which user doesnt need directly can be moved to BIN or whatever named folder. files like wub, wumt,task file can be moved to bin folder and you use use cmds to call those files.
    or you can use installer type method and save those files in roaming folder or something and shortcut in all programs and start menu. and i think a permanent solution like placing files in roaming folder or other fixed folder is good bcoz of task created in this program, so the normal end user doesnt change the location of your script pack, not knowing that it could affect task.
    at last i wish your script grow in beautiful installer and gui and used by millions people to deal with updates in future, as it seems the only method to deal with updates perfectly.
    thanks @rpo and @pf100
    gud luck
     
  8. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    7,897
    10,733
    240
    yep really I don't WD so waiting, thanks a lot man :worthy::)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
  10. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
    #411 pf100, May 14, 2018
    Last edited: May 14, 2018
    (OP)
    I don't use WD either. Since you don't use WD all you need is v2.2.9.
    v2.3.0 will be modified to update WD for people who use WD but will work the same as v2.2.9 for those who don't use WD.
    For testing the WD update task, I have it running with my entire hard drive as an exclusion so it doesn't actually do anything.:D
     
  11. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,447
    1,424
    60
    The user is supposed to enter the schedule time. If it's too difficult for him, replace :
    Code:
        Schedule_Time = InputBox("The Windows Defender Update task is schedule once a day" & vbCRLF & _
                     "Enter at what time (hh:mm:ss)")
    by :
    Code:
        Schedule_Time = InputBox("The Windows Defender Update task is scheduled once a day" & vbCRLF & _
                     "Enter at what time (hh:mm:ss)", "Start time","00:00:00")
        if  TimeValue(Schedule_Time) = "" then
    Click on OK and you get the default time 00:00:00.
     
  12. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
    #413 pf100, May 14, 2018
    Last edited: May 14, 2018
    (OP)
    I hate to say this, but the less user interaction, the better. Would you please make it so it defaults to 00:00:00 with no dialog boxes at all so it's completely silent?
    Edit: This is going to be a painful wrapper script version update thanks to all the new added forced update s*** windows 10 1803 has that I disabled which killed Defender updates that can't be easily fixed correctly.
     
  13. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
    #414 pf100, May 14, 2018
    Last edited: May 14, 2018
    (OP)
    I accidentally replied to my own post here and then deleted it, so let's take this opportunity to sing a song together. The song is called, "Windows 10 really does not want us doing manual updates but they can't stop us".
    But yeah, delete this.
     
  14. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    :p
     
  15. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
    #417 pf100, May 15, 2018
    Last edited: May 15, 2018
    (OP)
    @rpo It still shows a dialog box if the task was created or aborted. I need no indication that WDUcreate.vbs was actually run. I know that's bad practice but it won't hurt anything here and I won't tell anyone. Success or error dialog is not needed in this case because if it errors out they have bigger problems than the script. They can always uninstall it. I finally figured out everything else I need to know to complete this wrapper script update. Thanks, buddy.
    Edit: Maybe get rid of this at line 100?:
    Wscript.echo "Windows Defender Update task created"

    This sets Windows Defender Update task state. This update is almost done.
    Code:
    sc query > "%~dp0%servicedump.txt"
    
    find /i "windefend" "%~dp0%servicedump.txt" > nul & if errorlevel 1 (
        schtasks /Change /TN "WDU" /Disable >nul 2>&1
    ) else (
        schtasks /Change /TN "WDU" /Enable >nul 2>&1
    )
    del /f /q "%~dp0%servicedump.txt" >nul 2>&1
     
  16. pcnavarra

    pcnavarra MDL Senior Member

    Nov 13, 2017
    296
    114
    10
    For me its not possible what you guys trying to make there.
     
  17. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,447
    1,424
    60
    Delete or comment out line 100 :
    Code:
    '    Wscript.echo "Windows Defender Update task created"
    or in a cmd script :
    Code:
    cscript //nologo WDUcreate.vbs
     
  18. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,447
    1,424
    60
    You're free to pass your way.