Search code examples
.netwindows-10windows-update

in windows 10, is it possible to run windows updater from a .net application?


I am trying to find a way programmatically to auto install missing windows updates on Windows 10. If you can point me in the right direction or have information on how to do it in vb.net, that would be great.

Background, can skip:

I have a windows application that interfaces with some RNDIS/Ethernet Gadget hardware. The problem is when people started upgrading to windows 10. There is a bug in windows 10 that does not properly install the RNDIS/Ethernet Gadget driver. driver won't install until a more recent windows update is installed.


Solution

  •     Dim WindowsUpdaterSession As New AutomaticUpdates
    
        Try
        WindowsUpdaterSession.DetectNow()
            'worked
        Catch ex As Exception
            'didnt work
        End Try