Windows Update Agent API - download links / installation
I am using the Windows Update Agent API and the WSUSSCN2.CAB file to scan for
missing updates on machines that do not have Internet access. The scans work
fine. Since I cannot use the WUA API to download and install the updates (no
Internet connection), I obtain the patch download links for the missing
updates via the WUA API. I then use these download links to download the
update installation files onto a server that has Internet access and then
copy the updates from this server to the machine that does not have Internet
access. I then simply shell out and execute the update files one at a time.
The problem I have is that the download links provided by the WUA API are
sometimes for CAB files rather than for EXE/MSI/MSU files. This occurs mostly
in Vista machines, but I have run across other cases. So, I cannot just
shell out to install these updates. I know that if I go to the Microsoft
site to manually download an update, I will get an EXE/MSI/MSU file rather
than a CAB file.
Is there some way to obtain the download links for EXE/MSI/MSU files via the
WUA API rather than the links for CAB files? Alternatively, is there some
way to get the installer in WUA API to install one of these CAB files by
providing a location on the local machine to which the CAB file was copied
without having to use the WUA API to actually perform the download? I have
not found anything in the WUA API documentation that deals with these
questions.
Re: Windows Update Agent API - download links / installation
It may be worth investigating WSUS. Start here:
<http://technet.microsoft.com/en-us/wsus/default.aspx>
If you're determined to use the WUA API, it should be possible to
reverse-engineer the way the CAB files are installed. Look at the content from
a few of them and I'd guess it will be fairly obvious how to install them.
Harry.
Re: Windows Update Agent API - download links / installation
I haven't found anything concerning import and export functions in the WUA
API documentation. I hate to be a pain, but can you point me someplace?
Thanks!
Re: Windows Update Agent API - download links / installation
You're thinking of import/export of the WSUS database. We're talking about
packages on the client side.
I found the thread I was looking for, once I realised it was in
microsoft.public.security.baseline_analyzer rather than here. Turns out the
methods were CopyToCache and CopyFromCache; I was misremembering the names.
Harry.
Re: Windows Update Agent API - download links / installation
I found the thread I'd been looking for. These are the references:
<http://msdn2.microsoft.com/en-us/library/aa386878(VS.85).aspx>
<http://msdn2.microsoft.com/en-us/library/aa386101(VS.85).aspx>
Seems I'd misremembered the method names so I was looking for the wrong thing.
The documentation doesn't really make it clear exactly how these methods
interact with the rest of the system or what their intended purpose is, so I'm
unsure whether they'll be useful or not.
... if you do get this working, I for one would be very interested to hear
about it, and to see the code if you are willing to release it.
Harry.
Re: Windows Update Agent API - download links / installation
Thanks for your responses! I am using the DownloadContents to get the
download links. But, the CopyToCache method is interesting. I had not
really looked at that before, so I'll do some experimenting with it. If I
can figure out something with it, I'll be happy to post my results!
Thanks again!
RE: Windows Update Agent API - download links / installation
Hi PaqDev,
How is this subject going? I have the same problem with you. I wish
you can share more information. Thanks.
I want to using WUA API in visual studio 6.0 . I have to add WUapi.h
and Wuguid.lib to my c++ project. but when I call
IUpdateServiceManager::AddScanPackageService() , I get a error that indicate
E_INVALIDARG .
do you have any surguesstion?
Re: Windows Update Agent API - download links / installation
Hi,Ihave the similar problem,I wish you could share more information about
this subject.such as IUpdate::CopyFromCache.