Windows Update MiniTool

Discussion in 'MDL Projects and Applications' started by shewolf, Sep 3, 2015.

  1. Skunk1966

    Skunk1966 MDL Member

    Jul 15, 2011
    165
    167
    10
    @shewolf - thanks
    I'm curious if you like what we've done
     
  2. nimd4

    nimd4 MDL Novice

    Jul 10, 2007
    36
    5
    0
    #642 nimd4, Dec 2, 2016
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,479
    1,474
    60
    #643 rpo, Dec 8, 2016
    Last edited by a moderator: Apr 20, 2017
    The following powershell script
    1. retreives the Windows Update service state
    2. enables Windows Update service
    3. starts wumt_x86.exe or wumt_x64.exe depending on the OS architecture
    4. restore the Windows Update service state

    Code:
    # Put the .ps1 script and the Windows Update MiniTool in the same folder
    #
    If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
        [Security.Principal.WindowsBuiltInRole] “Administrator”)) #Test Administrator privileges
    {# Restart the script to get Administrator privileges and exit
    Start-Process powershell -Verb runAs -ArgumentList ("-file " + """" + $PSCommandPath + """"); Return}
    #We have Administrator privileges
    #
    # Call native Windows API. Add type for ShowWindowAsync from user32.dll
    $ShowWindowAsync = Add-Type –memberDefinition @” 
    [DllImport("user32.dll")]public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow); 
    “@ -name “Win32ShowWindowAsync” -namespace Win32Functions –passThru  
    [void]$ShowWindowAsync::ShowWindowAsync((Get-Process –id $pid).MainWindowHandle, 0) # Hide window
    #
    $WUStart=(get-CimInstance win32_service -filter "Name='wuauserv'").startmode # Get Windows Update service start mode
    $WUStatus=(Get-Service wuauserv).status # Get Windows Update service status
    set-service wuauserv -StartupType Automatic -status running
    If ((Get-CimInstance Win32_OperatingSystem).OSArchitecture -eq "32 bits") # check OS
    {$Pgm="wumt_x86.exe"} else {$Pgm="wumt_x64.exe"}  
    Start-Process ($PSScriptRoot + "\" + $Pgm) -ArgumentList "-update" -Wait -WindowStyle Normal 
    if (-NOT ($WUStatus -eq "Running")) {Stop-Service wuauserv} # stop Windows Update service 
    Set-Service wuauserv -StartupType $WUStart # restore Windows Update service startup type
     
  4. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,071
    10
    Can someone explain to me why and where it comes so paranoid need to disable Windows update service - 'wuauserv' ???
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,479
    1,474
    60
    Many users were "traumatized" by the forced windows updates, specially AU and some following cumulative updates. Windows 10 home users get very few control on Windows Update and many prefer disable wuauserv (i'm a Windows 10 Pro user, and hence not concerned).
     
  6. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,071
    10
    #646 shewolf, Dec 12, 2016
    Last edited: Mar 13, 2017
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,556
    15,642
    270
    lol

    This morning I received an email from @stupid user, asking me for a translation of new changelog and faqs. I really don't understand why he released this new version. ARgggg! :D
     
  8. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,556
    15,642
    270
    Now I understand. This kind of info (changelogs and faqs) translations are for forums only. Those translations are not included in wumt documentation at all.
     
  9. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,479
    1,474
    60
    @shewolf :

    Good news and thanks for the info. One precision :
    -onclose Run the specified command when closing the program. For example, you can run a bat file: [wumt.exe -update "-onclose D: \ run.bat"]. You can specify multiple -onclose keys, for example (disable the update service): [wumt.exe "-onclose sc stop wuauserv" "-onclose sc config wuauserv start= disabled"]. Quotation marks "" are required for this command.
    i.e start= disabled and not start = disabled (no space between start and =).
     
  10. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,071
    10
    Happens with copy-paste, corrected

    To disable the update service when closing the program do: wumt.exe -update "-onclose sc stop wuauserv" "-onclose sc config wuauserv start=disabled"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,479
    1,474
    60
    (wuauserv start= disabled : no space between start and =, but one space between = and disabled).
     
  12. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,556
    15,642
    270
  13. karmantyu

    karmantyu MDL Novice

    Jul 15, 2011
    6
    4
    0
    Any idea what happened with the translations on Yandex? Everything is blocked.
     
  14. slayer9450

    slayer9450 MDL Member

    Aug 3, 2015
    211
    87
    10
    WUMT no longer gives me any updates when I use wsusscn2.cab and do offline mode. It doesn't matter if I check the Include superseded box or not.
     
  15. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,768
    7,710
    210
    #656 Carlos Detweiller, Dec 14, 2016
    Last edited by a moderator: Apr 20, 2017
    Did you get the new wsusscn2.cab from December, 13?

    Code:
    Signed SHA256: ‎Tuesday, ‎December ‎13, ‎2016 05:48:51 PM
    Code:
    File: wsusscn2.cab
    CRC-32: 2a656209
    MD4: f46f785dd92955ac891d22efd53b8800
    MD5: e8fb1dcaf682436fd0028d4b7a1f0e92
    SHA-1: e1d9495596108c673e29a0019acdbfefff279f49
    SHA256: 06BEE0C805F38B94C3E1F929B8AE75644FD5A4B5F8E1E65D72A862BA0D70DCD9
    SHA512: F13025FEC7DEE99E5D65B1EE7126EAF75E8CC23ECD6452E159C5084362E417C58840FC2A3A8ABFB37700B7F512B9177CE2FE4E360030EED618DB60307AEB72EC

    Unfortunately, yes, that's one of the changes MS did with the latest WU Clients. AUOptions must not exist for Updates to be disabled. The old AUOptions=1 value doesn't exist anymore.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. tracit99

    tracit99 MDL Senior Member

    Oct 17, 2014
    278
    105
    10
    #657 tracit99, Dec 14, 2016
    Last edited: Dec 14, 2016
    Generally I am very careful when I make changes to the registry. All I am saying is that if the registry has the two entries as shown in my image above then Windows Update will be in Notification mode, not Disabled. I did not put the settings in the registry WUMT did when I first chose Notification, then changed to Disabled that is how my registry ended up with those two entries. If I delete the AUOptions entry then Windows Update goes to Disabled mode. It is easier to see that this is actually happening in Windows 8.1, because you can fire up the old Windows Update and check the Settings to see which mode Windows Update is in.
     
  17. slayer9450

    slayer9450 MDL Member

    Aug 3, 2015
    211
    87
    10
    Yes, but it's working now for some reason. I guess it was a "Windows will be Windows" issue.
     
  18. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,556
    15,642
    270