Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6536733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:31:46+00:00 2026-05-25T10:31:46+00:00

Is there any API for writing a C# program that could interface with Windows

  • 0

Is there any API for writing a C# program that could interface with Windows update, and use it to selectively install certain updates?

I’m thinking somewhere along the lines of storing a list in a central repository of approved updates. Then the client side applications (which would have to be installed once) would interface with Windows Update to determine what updates are available, then install the ones that are on the approved list. That way the updates are still applied automatically from a client-side perspective, but I can select which updates are being applied.

This is not my role in the company by the way, I was really just wondering if there is an API for windows update and how to use it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:31:47+00:00Added an answer on May 25, 2026 at 10:31 am

    Add a Reference to WUApiLib to your C# project.

    using WUApiLib;
    protected override void OnLoad(EventArgs e){
        base.OnLoad(e);
        UpdateSession uSession = new UpdateSession();
        IUpdateSearcher uSearcher = uSession.CreateUpdateSearcher();
        uSearcher.Online = false;
        try {
            ISearchResult sResult = uSearcher.Search("IsInstalled=1 And IsHidden=0");
            textBox1.Text = "Found " + sResult.Updates.Count + " updates" + Environment.NewLine;
            foreach (IUpdate update in sResult.Updates) {
                    textBox1.AppendText(update.Title + Environment.NewLine);
            }
        }
        catch (Exception ex) {
            Console.WriteLine("Something went wrong: " + ex.Message);
        }
    }
    

    Given you have a form with a TextBox this will give you a list of the currently installed updates. See http://msdn.microsoft.com/en-us/library/aa387102(VS.85).aspx for more documentation.

    This will, however, not allow you to find KB hotfixes which are not distributed via Windows Update.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any Win32/MFC API to get the CSIDL_LOCAL_APPDATA for any user that I
Is there in Windows API or in MFC any analog to atoh() function? atoh()
I'm writing C# code that uses the windows IP Helper API. One of the
I'm writing a console program that uses DirectSound API to render some audio data.
Is there any API to get the currently logged in user's name and password
Is there any api for viewing html content from w/in your blackberry application? To
Is there any existing code in Apache HttpClient or in the servlet API to
Are there any known how-tos or best practices for web service REST API versioning?
I can't seem to find a true restful Blog API - are there any?
I am new to OpenGL. Wondering if there is any good Scenegraph API/framework for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.