Windows Update MiniTool Notification AutoStart

Discussion in 'Scripting' started by dobbelina, Sep 17, 2016.

  1. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    #1 dobbelina, Sep 17, 2016
    Last edited by a moderator: Apr 20, 2017
    Hi all!

    Here's how to get the Windows Update MiniTool (WUMT) to AutoStart when a
    Windows Update notification arrives.
    Added bonus is that it starts elevated without input.

    First make sure WUMT is in this location:
    "C:\Program Files\WUMT\wumt_x64.exe"
    (Or edit the path in the WUMT.xml below)
    Then write secpol.msc in search and click enter.
    Expand Local Policies=>Audit Policy=>Audit process tracking=>Success, like this:

    [​IMG]

    Now open Task Scheduler and import this custom task from below, Done!

    WUMT.xml
    Code:
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
    <RegistrationInfo>
    <Date>2016-09-17T01:38:29.0939943</Date>
    <Author>Dobbelina</Author>
    <URI>\WUMT</URI>
    </RegistrationInfo>
    <Triggers>
    <EventTrigger>
    <Enabled>true</Enabled>
    <Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Security"&gt;&lt;Select Path="Security"&gt;
    *[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and Task = 13312 and (band(Keywords,9007199254740992)) and (EventID=4688)]]
    and
    *[EventData[Data[@Name='NewProcessName'] and (Data='C:\Windows\System32\MusNotificationUx.exe')]]
    &lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
    </EventTrigger>
    </Triggers>
    <Principals>
    <Principal id="Author">
    <UserId>S-1-5-21-3145961127-680278346-3877688820-1000</UserId>
    <LogonType>InteractiveToken</LogonType>
    <RunLevel>HighestAvailable</RunLevel>
    </Principal>
    </Principals>
    <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
    <StopOnIdleEnd>true</StopOnIdleEnd>
    <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
    <Priority>7</Priority>
    </Settings>
    <Actions Context="Author">
    <Exec>
    <Command>"C:\Program Files\WUMT\wumt_x64.exe"</Command>
    </Exec>
    </Actions>
    </Task>
    You can test it with this command line:
    %systemroot%\system32\MusNotificationUX.exe Toast_DownloadNeedUserAgreement

    As wumt_x64.exe don't seem to have any command line switches to automatically "Check for updates",
    I made a small Autoit executable that initiates this automatically.
    Just put in same folder as wumt_x64.exe.
    Then open task Scheduler and go to WUMT task.
    change Action "Start a program" to point to WUMT_Update.exe that's inside this archive.
    (Not wumt_x64.exe )
    WUMT_Update.zip

    That's it folks ! :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,141
    84,319
    340
    #2 abbodi1406, Sep 17, 2016
    Last edited by a moderator: Apr 20, 2017
    Use CODE tags :mushy:
    Code:
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Date>2016-09-17T01:38:29.0939943</Date>
        <Author>Dobbelina</Author>
        <URI>\WUMT</URI>
      </RegistrationInfo>
      <Triggers>
        <EventTrigger>
          <Enabled>true</Enabled>
          <Subscription><QueryList><Query Id="0" Path="Security"><Select Path="Security">
         *[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and Task = 13312 and (band(Keywords,9007199254740992)) and (EventID=4688)]] 
       and 
         *[EventData[Data[@Name='NewProcessName'] and (Data='C:\Windows\System32\MusNotificationUx.exe')]]
        </Select></Query></QueryList></Subscription>
        </EventTrigger>
      </Triggers>
      <Principals>
        <Principal id="Author">
          <UserId>S-1-5-21-3145961127-680278346-3877688820-1000</UserId>
          <LogonType>InteractiveToken</LogonType>
          <RunLevel>HighestAvailable</RunLevel>
        </Principal>
      </Principals>
      <Settings>
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>false</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
          <StopOnIdleEnd>true</StopOnIdleEnd>
          <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <WakeToRun>false</WakeToRun>
        <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
        <Priority>7</Priority>
      </Settings>
      <Actions Context="Author">
        <Exec>
          <Command>"C:\Program Files\WUMT\wumt_x64.exe"</Command>
        </Exec>
      </Actions>
    </Task>
     
  3. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    It is Done! :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    You can test it with this command line:
    %systemroot%\system32\MusNotificationUX.exe Toast_DownloadNeedUserAgreement
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. glennsamuel32

    glennsamuel32 MDL Senior Member

    Jul 15, 2012
    271
    87
    10
    Works as stated...thanks !!!
     
  6. bonesz

    bonesz MDL Addicted

    Jun 30, 2013
    634
    354
    30
    Worked perfectly thanks very much
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    #7 dobbelina, Sep 18, 2016
    Last edited: Sep 20, 2016
    (OP)
    As wumt_x64.exe don't seem to have any command line switches to automatically "Check for updates",
    I made a small Autoit executable that initiates this automatically.
    Just put in same folder as wumt_x64.exe.
    Then open task Scheduler and go to WUMT task.
    change Action "Start a program" to point to WUMT_Update.exe that's inside this archive.
    (Not wumt_x64.exe )
    WUMT_Update.zip

    Kinda meaningless to get notified, if you have to click "Check for updates" every time! :tooth:

    Have a Good Day ! :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,645
    270
    Actually I informed via email to stupid user about cmd line support a few hours ago. Let's see what he responds to.
     
  9. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    Hi Mr.X!

    Great!, I tried to navigate the forum.ru-board.com but my Russian is kind of absent :D
    Also analyzed the executable with strings, but it doesn't seem to have that capability?

    If it does, super!, then we can scrap my solution.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,645
    270
    Yeah, just awaiting his reply.
     
  11. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,027
    93,867
    450
    I really don't get it. People, who use WUMT, in general, don't want Windows to Auto-update but have the need that WUMT starts and autochecks for updates when an update is available for Windows/Office?
     
  12. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    #12 dobbelina, Sep 18, 2016
    Last edited: Sep 18, 2016
    (OP)
    Yes, for 3 reasons.
    1. You can hide updates that you don't want.(For example a driver that isn't compatible)
    2. You can see the file size of the update, and if you see it's a big one, you d/l it
    from http://catalog.update.microsoft.com/v7/site/home.aspx instead as a file.
    It goes much quicker, and you can re-distribute that large file in your local network, instead of having to d/l
    the update from MS to every machine.
    3. WUMT is a lot faster than the inbuilt WU client from MS.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,027
    93,867
    450
    My remark is not about using WUMT but the need for automation.

    That can simply be done by 2 steps, manually start WUMT and push the "check for updates" button.
     
  14. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    #14 dobbelina, Sep 18, 2016
    Last edited: Sep 18, 2016
    (OP)
    The whole idea of having the WUMT client to automatically start when a notification comes is just that, It should go automatically,
    without any user input.

    Trying to mimic the behavior of the MS client as far as possible.
    But with one distinct difference, I'm in control ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,027
    93,867
    450
    Than let the MS client do it's thing and auto update, start WUMT and you can fetch the download links for the installed update(s).

    I thought tools like WUMT were developed to counter-act the normal behavior of WU in 10.
     
  16. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    Yes, it gives control to you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,065
    10

    I would say the same as Enthousiast:
    And then you can hide updates that you don't want.



    For download update file follow this post #127, I find it much more effective.



    WUMT is only a front end for WU, therefore the speed does not depend on it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    #18 dobbelina, Sep 18, 2016
    Last edited by a moderator: Apr 20, 2017
    (OP)
    It doesn't start minimized, but here, if you want it minimized:
    Code:
    @echo off
    @cd /d "%~dp0"
    START WUMT_Update.exe
    START /min wumt_x64.exe
    EXIT
    WUMT does not run in the tray.
    If you run it directly from a shortcut, you have the minimized option under properties.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. dobbelina

    dobbelina MDL Senior Member

    Apr 2, 2009
    426
    526
    10
    Ahh, yes that's even better!

    I think it feels a lot faster than WU, but that can off course be only me hallucinating :D
    Just love this little proggie!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,027
    93,867
    450
    How can it "feel" a lot faster? It either is or it isn't.

    What is faster than WU downloading an update and installing it?

    Starting a 3rd party tool (manually or automated), checking for updates (manually or automated), downloading the update and installing it manually, to me this feels seems slower ;):D