"5" Windows Automatic Update API (5)

Source: Internet
Author: User

This article on the previous several articles in the deficiencies and errors in the place, to make changes. Hope to help you.

In Vista and XP, WUA is different in many places, depending on the automatic update version of XP. The biggest difference is that after the installation of XP-SP2, the WUA version is older, and many of the functions in the interface are not provided. For example: proxy class, Iupdate3,iupdatesearcher2 and so on. Therefore, when using. NET development, it is necessary to note whether the client has updated the WUA. Basically, the newest WUA are all V6 editions. There is little difference between the versions available under Vista.

There are agents in the case:
For example, the company settings agent, XP, will not be updated, and Vista will, because in Vista will pop up let the user enter the proxy username and Password dialog box. When this happens, the program you write to search, download, install must first create a proxy class, and then the proxy class to create the appropriate action class.

Code references are as follows:
1 Wuapilib.updatesessionclass session = new Wuapilib.updatesessionclass ();
2
3 session. Webproxy.address = @ "**********";
4 session. Webproxy.promptforcredentials (sender, "Input Your passport!");
PromptForCredentials method, pops up the System dialog box, and then enters the username password and automatically gives it to the proxy class.
1 Wuapilib.iupdatesearcher upsearch = session. CreateUpdateSearcher ();
2 Wuapilib.iupdatedownloader updownload = session. Createupdatedownloader ();
3 Wuapilib.iupdateinstaller2 Upinstall = (wuapilib.iupdateinstaller2) session. Createupdateinstaller ();
Finally, if you are using the D version of the operating system, then Automatic Updates will first require you to update the WGA, in the case of validation to update the following procedures, using their own written procedures to update more easily to update a lot of XP under the automatic Update can not update the parts, such as driver.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.