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 api/lib for python that will get me the synonyms of a
Is there any GUI API that can be used together with DirectX other than
Is there any iTunes API for the iPhone OS which I can use to
When writing an API or reusable object, is there any technical reason why all
Is there any class provided in the Java standard API that allows file structure
Is there any way of writing a decorator such that the following would work?
Are there any sorts of useful idioms I can make use of when writing
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

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.