Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Update > WUA SDK: UninstallationBehavior is always null (or Nothing)

Reply
Thread Tools Display Modes

WUA SDK: UninstallationBehavior is always null (or Nothing)

 
 
Patrick
Guest
Posts: n/a

 
      01-09-2006
Hi

We're working with the WUA SDK 2.0, in this case, from Visual Basic 6.0.

When processing updates, we are looping through an enumeration of IUpdate
interfaces, and can pull values for many things--but .UninstallationBehavior
is always coming up as Nothing in VB. It should be essentially the same as
the InstallationBehavior interface, except holding details for
uninstallation. There is nothing in the SDK docs indicating this should be
Nothing, or what that means.

This is true for all patches required on two different machines running
Windows XP SP 2.

Set ssn = CreateObject("Microsoft.Update.Session")
Set searcher = ssn.CreateUpdateSearcher()
Set mgr = CreateObject("Microsoft.Update.ServiceManager")
Set svc = mgr.AddScanPackageService("Scan", "d:\temp\wsusscan.cab")

searcher.Online = FALSE ' can not go online
searcher.CanAutomaticallyUpgradeService = FALSE ' can not upgrade WUA
searcher.ServiceID = svc.ServiceID ' searcher to use Scan Service

Set results = searcher.Search("IsInstalled=0")

If results.Updates.Count = 0 Then
WScript.Quit
End If

Set updates = results.Updates
For i = 0 to updates.Count-1
Set an_update = updates.Item(i)

MsgBox an_update.Title & "--" & an_update.Identity.UpdateID
If ( an_update.UninstallationBehavior is nothing ) Then
MsgBox ".UninstallationBehavior is Nothing"
Else
MsgBox "UpdateInfo.UninstallationBehavior.CanRequestUserI nput: " &
an_update.UninstallationBehavior.CanRequestUserInp ut
End If
Next
WScript.Quit


Thanks
Patrick
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: "Error: 'null' is null or not an object" when trying to view video Robert Aldwinckle Windows Vista Performance 1 12-18-2007 04:32 PM
(null) Norman Diamond Windows Vista Drivers 2 11-14-2006 06:40 AM
'null' is not null after microsoft update glassman Windows Update 0 08-12-2005 08:20 PM
PDEV_BROADCAST_HDR is NULL Mike Pulice Windows Vista Drivers 0 11-18-2003 03:34 PM
DriverStartIo MDL NULL Frank Natoli Windows Vista Drivers 5 10-09-2003 03:25 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59