Windows Update Agent not installed on Windows 2003 [Error on CreateObject("Microsoft.Update.Session"

Discussion in 'Scripting' started by Javier J, Feb 2, 2005.

  1. Javier J

    Javier J Guest

    Hi all!!

    Am trying to run some code samples to try to understand the Windows
    Update API, but I am running into problems:

    I try to run the following code:

    Set us = CreateObject("Microsoft.Update.Session")
    Set updates = CreateObject("Microsoft.Update.UpdateColl")
    Set download = us.CreateUpdateDownloader()
    Set usearch = us.CreateupdateSearcher()
    Set usresult = usearch.Search("IsInstalled=0 and Type='Software'")

    For a = 0 to usresult.Updates.Count - 1
    Set patch = usresult.Updates.Item(a)
    updates.Add(patch)
    WScript.Echo "Patch Title: " & updates.Item(a).Title
    Next

    <...>

    But when I run the script, I get:

    wuControl-test.vbs(15, 1) Microsoft VBScript runtime error: ActiveX
    component can't create object: 'Microsoft.Update.Session'

    I've looked on the Windows Update Agent pages on the MS site
    (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wua_sdk/wua/portal_client.asp)
    and the page "Determining the Current Version of WUA", it says:

    When the version of WUAUENG.DLL is 5.4.3790.1000 or greater, WUA is
    installed. A version less than 5.4.3790.1000 indicates that SUS 1.0 is
    installed.

    On my system (Windows 2003 STD Ed), the file WUAUENG.DLL is version
    5.4.3790.0.... Is that the problem? How can I get the WU Agent on
    Windows 2003??

    Thanks a lot...

    Javier J
     
    Javier J, Feb 2, 2005
    #1
    1. Advertisements

  2. Javier J

    J Ford Guest

    Here is a snippet from a "Scripting Guy" pos
    http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept04/hey0929.mspx
    <snip>
    To be honest, we only know for sure that the Microsoft.Update.Session object
    gets installed on Windows XP (and is automatically installed when you install
    XP Service Pack 2). If you’re running Windows 2000, you might want to visit
    Windows Update, install the latest version, then run the preceding script and
    see if it works.
    </snip>
     
    J Ford, Feb 2, 2005
    #2
    1. Advertisements

  3. Hi

    gets installed when connecting to a WUS (beta) server. I assume that
    SP1 (beta) for Win2k3 Server also installs them (as SP2 for WinXP does).

    I think WU v5 is available for Win2k3 Server (it is available for
    WinXP, but not Win2k).

    Try to go to
    http://v5.windowsupdate.microsoft.com/
    and see if it installs any newer controls.
     
    Torgeir Bakken \(MVP\), Feb 3, 2005
    #3
  4. Hi

    My first post was cut short, here is the complete one:

    You need the control that Windows Updates v5 installs (or the one that
    gets installed when connecting to a WUS (beta) server. I assume that
    SP1 (beta) for Win2k3 Server also installs them (as SP2 for WinXP does).

    I think WU v5 is available for Win2k3 Server (it is available for
    WinXP, but not Win2k).

    Try to go to
    http://v5.windowsupdate.microsoft.com/
    and see if it installs any newer controls (if you are redirected
    to http://v5.windowsupdate.microsoft.com/ it is not).
     
    Torgeir Bakken \(MVP\), Feb 3, 2005
    #4
  5. Javier J

    Javier J Guest

    Just for those who are interested, when you use W2K and go to
    v5.windowsupdate.microsoft.com... you get bouced back to v4.... and no
    WU control is ever installed...

    It seems that WU agent is, at least at the moment, a WXP-only thing...

    Javier J
     
    Javier J, Feb 7, 2005
    #5
  6. I'm afraid that the WU control is XP-only (at least, at the moment), as
    both W2K and W2003 get redirected to v4....
     
    Javier Jarava, Feb 7, 2005
    #6
  7. Hi

    Unless you connect the Win2k or Win2003 computer to a WUS (beta)
    server, that will install the new WU controls even for those OSes...
     
    Torgeir Bakken \(MVP\), Feb 7, 2005
    #7
  8. Javier J

    Javier J Guest

    Good to know about that; I was plannig to "play" a bit with WUS soon; I
    guess I'll have to make it "sooner" ;)

    Thanks a lot.


    Javier Jarava

    PS. Any update about when WUS will go out-of-Beta?
     
    Javier J, Feb 11, 2005
    #8
  9. I don't know about any...
     
    Torgeir Bakken \(MVP\), Feb 11, 2005
    #9
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.