473,386 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

WUAPILib

Hi,

Not sure where this post belongs so please excuse me if it’s in the wrong
group.

I’m trying to use the WUAPILib.dll from Windows Update v5 with VB.NET. I
can instantiate it locally fine but what I really need is to be able to do
this remotely.

My first thought was to use CreateObject:

Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1", "XP-TEST1")

This always returns “ActiveX Cannot Create Object”.

It’s worth noting that the XP machine doesn’t have SP 2 on it, I’ve just
upgraded WU to v5. This rules out any firewall or enhanced security
configuration issues.

I thought it may be a DCOM configuration issue but when I looked on the XP
box, it looks like the WU library doesn’t support remote instantiation.
Perhaps a way around this is to use WMI to instantiate the API locally but
can WMI be used as a proxy?

Any thoughts or pointers would be greatly appreciated.

--
--------------------------------------------------------------
Flarepath Windows Update Analyser - download at http://www.flarepath.com
--------------------------------------------------------------
Jul 21 '05 #1
11 7920
Glen,

Can you provide more information with regard to what you want to do?

That way I may be able to write some sample code etc for you.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:1E**********************************@microsof t.com...
Hi,

Not sure where this post belongs so please excuse me if it's in the wrong
group.

I'm trying to use the WUAPILib.dll from Windows Update v5 with VB.NET. I
can instantiate it locally fine but what I really need is to be able to do
this remotely.

My first thought was to use CreateObject:

Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1", "XP-TEST1")

This always returns "ActiveX Cannot Create Object".

It's worth noting that the XP machine doesn't have SP 2 on it, I've just
upgraded WU to v5. This rules out any firewall or enhanced security
configuration issues.

I thought it may be a DCOM configuration issue but when I looked on the XP
box, it looks like the WU library doesn't support remote instantiation.
Perhaps a way around this is to use WMI to instantiate the API locally but
can WMI be used as a proxy?

Any thoughts or pointers would be greatly appreciated.

--
--------------------------------------------------------------
Flarepath Windows Update Analyser - download at http://www.flarepath.com
--------------------------------------------------------------

Jul 21 '05 #2
Glen,

Can you provide more information with regard to what you want to do?

That way I may be able to write some sample code etc for you.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:1E**********************************@microsof t.com...
Hi,

Not sure where this post belongs so please excuse me if it's in the wrong
group.

I'm trying to use the WUAPILib.dll from Windows Update v5 with VB.NET. I
can instantiate it locally fine but what I really need is to be able to do
this remotely.

My first thought was to use CreateObject:

Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1", "XP-TEST1")

This always returns "ActiveX Cannot Create Object".

It's worth noting that the XP machine doesn't have SP 2 on it, I've just
upgraded WU to v5. This rules out any firewall or enhanced security
configuration issues.

I thought it may be a DCOM configuration issue but when I looked on the XP
box, it looks like the WU library doesn't support remote instantiation.
Perhaps a way around this is to use WMI to instantiate the API locally but
can WMI be used as a proxy?

Any thoughts or pointers would be greatly appreciated.

--
--------------------------------------------------------------
Flarepath Windows Update Analyser - download at http://www.flarepath.com
--------------------------------------------------------------

Jul 21 '05 #3
David,

Thanks for the reply. I need to be able to extract the update history from
a WU v5 machine. As I said below, I can do it locally but I need to be able
to do it remotely from a central machine. Previously, I could just parse the
iuhist.xml file but v5 uses the JET database format (EDB).

If you open up a new project and then add a reference to WUAPI 2.0 Type
Library. The development machine needs to have WU v5 installed.

Here is a quick sub to test the update history query:

Private Sub updateSearcher()
Try
' This will instantiate the api locally.
Dim wu As New WUApiLib.UpdateSearcher

' This "should" instantiate it remotely
' Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1",
"XP-TEST1")

wu.Online = True

Dim i As Integer = wu.GetTotalHistoryCount

Dim c As WUApiLib.IUpdateHistoryEntryCollection

c = wu.QueryHistory(0, i)

Dim e As WUApiLib.IUpdateHistoryEntry

i = 1

For Each e In c
Console.WriteLine("Title: {0}", e.Title)
Console.WriteLine("Operation: {0}", e.Operation.ToString)
Console.WriteLine("Description: {0}", e.Description)
Console.WriteLine("ResultCode: {0}", e.ResultCode.ToString)

Console.WriteLine("ClientApplicationID: {0}",
e.ClientApplicationID)
Console.WriteLine("UpdateIdentity: {0}",
e.UpdateIdentity.UpdateID)

Console.WriteLine("------------------------------------------------------------------")

If i > 5 Then
Console.Write("Press enter to continue...")
Console.ReadLine()
Console.WriteLine()
i = 1
Else
i += 1
End If
Next
Catch ex As Exception
Console.Write(ex.Message)
End Try
End Sub

Perhaps there is an ODBC driver to read EDB files?

Anyway, look forward to seeing if you can come up with something!

Regards,

Glen

"David Herman .:MVP:." wrote:
Glen,

Can you provide more information with regard to what you want to do?

That way I may be able to write some sample code etc for you.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:1E**********************************@microsof t.com...
Hi,

Not sure where this post belongs so please excuse me if it's in the wrong
group.

I'm trying to use the WUAPILib.dll from Windows Update v5 with VB.NET. I
can instantiate it locally fine but what I really need is to be able to do
this remotely.

My first thought was to use CreateObject:

Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1", "XP-TEST1")

This always returns "ActiveX Cannot Create Object".

It's worth noting that the XP machine doesn't have SP 2 on it, I've just
upgraded WU to v5. This rules out any firewall or enhanced security
configuration issues.

I thought it may be a DCOM configuration issue but when I looked on the XP
box, it looks like the WU library doesn't support remote instantiation.
Perhaps a way around this is to use WMI to instantiate the API locally but
can WMI be used as a proxy?

Any thoughts or pointers would be greatly appreciated.

--
--------------------------------------------------------------
Flarepath Windows Update Analyser - download at http://www.flarepath.com
--------------------------------------------------------------


Jul 21 '05 #4
David,

Thanks for the reply. I need to be able to extract the update history from
a WU v5 machine. As I said below, I can do it locally but I need to be able
to do it remotely from a central machine. Previously, I could just parse the
iuhist.xml file but v5 uses the JET database format (EDB).

If you open up a new project and then add a reference to WUAPI 2.0 Type
Library. The development machine needs to have WU v5 installed.

Here is a quick sub to test the update history query:

Private Sub updateSearcher()
Try
' This will instantiate the api locally.
Dim wu As New WUApiLib.UpdateSearcher

' This "should" instantiate it remotely
' Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1",
"XP-TEST1")

wu.Online = True

Dim i As Integer = wu.GetTotalHistoryCount

Dim c As WUApiLib.IUpdateHistoryEntryCollection

c = wu.QueryHistory(0, i)

Dim e As WUApiLib.IUpdateHistoryEntry

i = 1

For Each e In c
Console.WriteLine("Title: {0}", e.Title)
Console.WriteLine("Operation: {0}", e.Operation.ToString)
Console.WriteLine("Description: {0}", e.Description)
Console.WriteLine("ResultCode: {0}", e.ResultCode.ToString)

Console.WriteLine("ClientApplicationID: {0}",
e.ClientApplicationID)
Console.WriteLine("UpdateIdentity: {0}",
e.UpdateIdentity.UpdateID)

Console.WriteLine("------------------------------------------------------------------")

If i > 5 Then
Console.Write("Press enter to continue...")
Console.ReadLine()
Console.WriteLine()
i = 1
Else
i += 1
End If
Next
Catch ex As Exception
Console.Write(ex.Message)
End Try
End Sub

Perhaps there is an ODBC driver to read EDB files?

Anyway, look forward to seeing if you can come up with something!

Regards,

Glen

"David Herman .:MVP:." wrote:
Glen,

Can you provide more information with regard to what you want to do?

That way I may be able to write some sample code etc for you.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:1E**********************************@microsof t.com...
Hi,

Not sure where this post belongs so please excuse me if it's in the wrong
group.

I'm trying to use the WUAPILib.dll from Windows Update v5 with VB.NET. I
can instantiate it locally fine but what I really need is to be able to do
this remotely.

My first thought was to use CreateObject:

Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1", "XP-TEST1")

This always returns "ActiveX Cannot Create Object".

It's worth noting that the XP machine doesn't have SP 2 on it, I've just
upgraded WU to v5. This rules out any firewall or enhanced security
configuration issues.

I thought it may be a DCOM configuration issue but when I looked on the XP
box, it looks like the WU library doesn't support remote instantiation.
Perhaps a way around this is to use WMI to instantiate the API locally but
can WMI be used as a proxy?

Any thoughts or pointers would be greatly appreciated.

--
--------------------------------------------------------------
Flarepath Windows Update Analyser - download at http://www.flarepath.com
--------------------------------------------------------------


Jul 21 '05 #5
I'm actually in the process of looking to write an app which does what you
want with the added feature of removing existing record. I'll keep you
posted.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:B9**********************************@microsof t.com...
David,

Thanks for the reply. I need to be able to extract the update history
from
a WU v5 machine. As I said below, I can do it locally but I need to be
able
to do it remotely from a central machine. Previously, I could just parse
the
iuhist.xml file but v5 uses the JET database format (EDB).

If you open up a new project and then add a reference to WUAPI 2.0 Type
Library. The development machine needs to have WU v5 installed.

Here is a quick sub to test the update history query:

Private Sub updateSearcher()
Try
' This will instantiate the api locally.
Dim wu As New WUApiLib.UpdateSearcher

' This "should" instantiate it remotely
' Dim wu As Object =
CreateObject("Microsoft.Update.Searcher.1",
"XP-TEST1")

wu.Online = True

Dim i As Integer = wu.GetTotalHistoryCount

Dim c As WUApiLib.IUpdateHistoryEntryCollection

c = wu.QueryHistory(0, i)

Dim e As WUApiLib.IUpdateHistoryEntry

i = 1

For Each e In c
Console.WriteLine("Title: {0}", e.Title)
Console.WriteLine("Operation: {0}", e.Operation.ToString)
Console.WriteLine("Description: {0}", e.Description)
Console.WriteLine("ResultCode: {0}", e.ResultCode.ToString)

Console.WriteLine("ClientApplicationID: {0}",
e.ClientApplicationID)
Console.WriteLine("UpdateIdentity: {0}",
e.UpdateIdentity.UpdateID)

Console.WriteLine("------------------------------------------------------------------")

If i > 5 Then
Console.Write("Press enter to continue...")
Console.ReadLine()
Console.WriteLine()
i = 1
Else
i += 1
End If
Next
Catch ex As Exception
Console.Write(ex.Message)
End Try
End Sub

Perhaps there is an ODBC driver to read EDB files?

Anyway, look forward to seeing if you can come up with something!

Regards,

Glen

"David Herman .:MVP:." wrote:
Glen,

Can you provide more information with regard to what you want to do?

That way I may be able to write some sample code etc for you.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:1E**********************************@microsof t.com...
> Hi,
>
> Not sure where this post belongs so please excuse me if it's in the
> wrong
> group.
>
> I'm trying to use the WUAPILib.dll from Windows Update v5 with VB.NET.
> I
> can instantiate it locally fine but what I really need is to be able to
> do
> this remotely.
>
> My first thought was to use CreateObject:
>
> Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1",
> "XP-TEST1")
>
> This always returns "ActiveX Cannot Create Object".
>
> It's worth noting that the XP machine doesn't have SP 2 on it, I've
> just
> upgraded WU to v5. This rules out any firewall or enhanced security
> configuration issues.
>
> I thought it may be a DCOM configuration issue but when I looked on the
> XP
> box, it looks like the WU library doesn't support remote instantiation.
> Perhaps a way around this is to use WMI to instantiate the API locally
> but
> can WMI be used as a proxy?
>
> Any thoughts or pointers would be greatly appreciated.
>
> --
> --------------------------------------------------------------
> Flarepath Windows Update Analyser - download at
> http://www.flarepath.com
> --------------------------------------------------------------


Jul 21 '05 #6
I'm actually in the process of looking to write an app which does what you
want with the added feature of removing existing record. I'll keep you
posted.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:B9**********************************@microsof t.com...
David,

Thanks for the reply. I need to be able to extract the update history
from
a WU v5 machine. As I said below, I can do it locally but I need to be
able
to do it remotely from a central machine. Previously, I could just parse
the
iuhist.xml file but v5 uses the JET database format (EDB).

If you open up a new project and then add a reference to WUAPI 2.0 Type
Library. The development machine needs to have WU v5 installed.

Here is a quick sub to test the update history query:

Private Sub updateSearcher()
Try
' This will instantiate the api locally.
Dim wu As New WUApiLib.UpdateSearcher

' This "should" instantiate it remotely
' Dim wu As Object =
CreateObject("Microsoft.Update.Searcher.1",
"XP-TEST1")

wu.Online = True

Dim i As Integer = wu.GetTotalHistoryCount

Dim c As WUApiLib.IUpdateHistoryEntryCollection

c = wu.QueryHistory(0, i)

Dim e As WUApiLib.IUpdateHistoryEntry

i = 1

For Each e In c
Console.WriteLine("Title: {0}", e.Title)
Console.WriteLine("Operation: {0}", e.Operation.ToString)
Console.WriteLine("Description: {0}", e.Description)
Console.WriteLine("ResultCode: {0}", e.ResultCode.ToString)

Console.WriteLine("ClientApplicationID: {0}",
e.ClientApplicationID)
Console.WriteLine("UpdateIdentity: {0}",
e.UpdateIdentity.UpdateID)

Console.WriteLine("------------------------------------------------------------------")

If i > 5 Then
Console.Write("Press enter to continue...")
Console.ReadLine()
Console.WriteLine()
i = 1
Else
i += 1
End If
Next
Catch ex As Exception
Console.Write(ex.Message)
End Try
End Sub

Perhaps there is an ODBC driver to read EDB files?

Anyway, look forward to seeing if you can come up with something!

Regards,

Glen

"David Herman .:MVP:." wrote:
Glen,

Can you provide more information with regard to what you want to do?

That way I may be able to write some sample code etc for you.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:1E**********************************@microsof t.com...
> Hi,
>
> Not sure where this post belongs so please excuse me if it's in the
> wrong
> group.
>
> I'm trying to use the WUAPILib.dll from Windows Update v5 with VB.NET.
> I
> can instantiate it locally fine but what I really need is to be able to
> do
> this remotely.
>
> My first thought was to use CreateObject:
>
> Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1",
> "XP-TEST1")
>
> This always returns "ActiveX Cannot Create Object".
>
> It's worth noting that the XP machine doesn't have SP 2 on it, I've
> just
> upgraded WU to v5. This rules out any firewall or enhanced security
> configuration issues.
>
> I thought it may be a DCOM configuration issue but when I looked on the
> XP
> box, it looks like the WU library doesn't support remote instantiation.
> Perhaps a way around this is to use WMI to instantiate the API locally
> but
> can WMI be used as a proxy?
>
> Any thoughts or pointers would be greatly appreciated.
>
> --
> --------------------------------------------------------------
> Flarepath Windows Update Analyser - download at
> http://www.flarepath.com
> --------------------------------------------------------------


Jul 21 '05 #7
David,

Look forward to it. Do you have any timescales?

Thanks

Glen

"David Herman .:MVP:." wrote:
I'm actually in the process of looking to write an app which does what you
want with the added feature of removing existing record. I'll keep you
posted.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:B9**********************************@microsof t.com...
David,

Thanks for the reply. I need to be able to extract the update history
from
a WU v5 machine. As I said below, I can do it locally but I need to be
able
to do it remotely from a central machine. Previously, I could just parse
the
iuhist.xml file but v5 uses the JET database format (EDB).

If you open up a new project and then add a reference to WUAPI 2.0 Type
Library. The development machine needs to have WU v5 installed.

Here is a quick sub to test the update history query:

Private Sub updateSearcher()
Try
' This will instantiate the api locally.
Dim wu As New WUApiLib.UpdateSearcher

' This "should" instantiate it remotely
' Dim wu As Object =
CreateObject("Microsoft.Update.Searcher.1",
"XP-TEST1")

wu.Online = True

Dim i As Integer = wu.GetTotalHistoryCount

Dim c As WUApiLib.IUpdateHistoryEntryCollection

c = wu.QueryHistory(0, i)

Dim e As WUApiLib.IUpdateHistoryEntry

i = 1

For Each e In c
Console.WriteLine("Title: {0}", e.Title)
Console.WriteLine("Operation: {0}", e.Operation.ToString)
Console.WriteLine("Description: {0}", e.Description)
Console.WriteLine("ResultCode: {0}", e.ResultCode.ToString)

Console.WriteLine("ClientApplicationID: {0}",
e.ClientApplicationID)
Console.WriteLine("UpdateIdentity: {0}",
e.UpdateIdentity.UpdateID)

Console.WriteLine("------------------------------------------------------------------")

If i > 5 Then
Console.Write("Press enter to continue...")
Console.ReadLine()
Console.WriteLine()
i = 1
Else
i += 1
End If
Next
Catch ex As Exception
Console.Write(ex.Message)
End Try
End Sub

Perhaps there is an ODBC driver to read EDB files?

Anyway, look forward to seeing if you can come up with something!

Regards,

Glen

"David Herman .:MVP:." wrote:
Glen,

Can you provide more information with regard to what you want to do?

That way I may be able to write some sample code etc for you.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:1E**********************************@microsof t.com...
> Hi,
>
> Not sure where this post belongs so please excuse me if it's in the
> wrong
> group.
>
> I'm trying to use the WUAPILib.dll from Windows Update v5 with VB.NET.
> I
> can instantiate it locally fine but what I really need is to be able to
> do
> this remotely.
>
> My first thought was to use CreateObject:
>
> Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1",
> "XP-TEST1")
>
> This always returns "ActiveX Cannot Create Object".
>
> It's worth noting that the XP machine doesn't have SP 2 on it, I've
> just
> upgraded WU to v5. This rules out any firewall or enhanced security
> configuration issues.
>
> I thought it may be a DCOM configuration issue but when I looked on the
> XP
> box, it looks like the WU library doesn't support remote instantiation.
> Perhaps a way around this is to use WMI to instantiate the API locally
> but
> can WMI be used as a proxy?
>
> Any thoughts or pointers would be greatly appreciated.
>
> --
> --------------------------------------------------------------
> Flarepath Windows Update Analyser - download at
> http://www.flarepath.com
> --------------------------------------------------------------


Jul 21 '05 #8
David,

Look forward to it. Do you have any timescales?

Thanks

Glen

"David Herman .:MVP:." wrote:
I'm actually in the process of looking to write an app which does what you
want with the added feature of removing existing record. I'll keep you
posted.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:B9**********************************@microsof t.com...
David,

Thanks for the reply. I need to be able to extract the update history
from
a WU v5 machine. As I said below, I can do it locally but I need to be
able
to do it remotely from a central machine. Previously, I could just parse
the
iuhist.xml file but v5 uses the JET database format (EDB).

If you open up a new project and then add a reference to WUAPI 2.0 Type
Library. The development machine needs to have WU v5 installed.

Here is a quick sub to test the update history query:

Private Sub updateSearcher()
Try
' This will instantiate the api locally.
Dim wu As New WUApiLib.UpdateSearcher

' This "should" instantiate it remotely
' Dim wu As Object =
CreateObject("Microsoft.Update.Searcher.1",
"XP-TEST1")

wu.Online = True

Dim i As Integer = wu.GetTotalHistoryCount

Dim c As WUApiLib.IUpdateHistoryEntryCollection

c = wu.QueryHistory(0, i)

Dim e As WUApiLib.IUpdateHistoryEntry

i = 1

For Each e In c
Console.WriteLine("Title: {0}", e.Title)
Console.WriteLine("Operation: {0}", e.Operation.ToString)
Console.WriteLine("Description: {0}", e.Description)
Console.WriteLine("ResultCode: {0}", e.ResultCode.ToString)

Console.WriteLine("ClientApplicationID: {0}",
e.ClientApplicationID)
Console.WriteLine("UpdateIdentity: {0}",
e.UpdateIdentity.UpdateID)

Console.WriteLine("------------------------------------------------------------------")

If i > 5 Then
Console.Write("Press enter to continue...")
Console.ReadLine()
Console.WriteLine()
i = 1
Else
i += 1
End If
Next
Catch ex As Exception
Console.Write(ex.Message)
End Try
End Sub

Perhaps there is an ODBC driver to read EDB files?

Anyway, look forward to seeing if you can come up with something!

Regards,

Glen

"David Herman .:MVP:." wrote:
Glen,

Can you provide more information with regard to what you want to do?

That way I may be able to write some sample code etc for you.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:1E**********************************@microsof t.com...
> Hi,
>
> Not sure where this post belongs so please excuse me if it's in the
> wrong
> group.
>
> I'm trying to use the WUAPILib.dll from Windows Update v5 with VB.NET.
> I
> can instantiate it locally fine but what I really need is to be able to
> do
> this remotely.
>
> My first thought was to use CreateObject:
>
> Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1",
> "XP-TEST1")
>
> This always returns "ActiveX Cannot Create Object".
>
> It's worth noting that the XP machine doesn't have SP 2 on it, I've
> just
> upgraded WU to v5. This rules out any firewall or enhanced security
> configuration issues.
>
> I thought it may be a DCOM configuration issue but when I looked on the
> XP
> box, it looks like the WU library doesn't support remote instantiation.
> Perhaps a way around this is to use WMI to instantiate the API locally
> but
> can WMI be used as a proxy?
>
> Any thoughts or pointers would be greatly appreciated.
>
> --
> --------------------------------------------------------------
> Flarepath Windows Update Analyser - download at
> http://www.flarepath.com
> --------------------------------------------------------------


Jul 21 '05 #9
I want to get started and finish by the end of this weekend, i hope. May get
the dev team in WU at MS to take a look too, to make sure its up to scratch.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:10**********************************@microsof t.com...
David,

Look forward to it. Do you have any timescales?

Thanks

Glen

"David Herman .:MVP:." wrote:
I'm actually in the process of looking to write an app which does what
you
want with the added feature of removing existing record. I'll keep you
posted.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:B9**********************************@microsof t.com...
> David,
>
> Thanks for the reply. I need to be able to extract the update history
> from
> a WU v5 machine. As I said below, I can do it locally but I need to be
> able
> to do it remotely from a central machine. Previously, I could just
> parse
> the
> iuhist.xml file but v5 uses the JET database format (EDB).
>
> If you open up a new project and then add a reference to WUAPI 2.0 Type
> Library. The development machine needs to have WU v5 installed.
>
> Here is a quick sub to test the update history query:
>
> Private Sub updateSearcher()
> Try
> ' This will instantiate the api locally.
> Dim wu As New WUApiLib.UpdateSearcher
>
> ' This "should" instantiate it remotely
> ' Dim wu As Object =
> CreateObject("Microsoft.Update.Searcher.1",
> "XP-TEST1")
>
> wu.Online = True
>
> Dim i As Integer = wu.GetTotalHistoryCount
>
> Dim c As WUApiLib.IUpdateHistoryEntryCollection
>
> c = wu.QueryHistory(0, i)
>
> Dim e As WUApiLib.IUpdateHistoryEntry
>
> i = 1
>
> For Each e In c
> Console.WriteLine("Title: {0}", e.Title)
> Console.WriteLine("Operation: {0}",
> e.Operation.ToString)
> Console.WriteLine("Description: {0}", e.Description)
> Console.WriteLine("ResultCode: {0}",
> e.ResultCode.ToString)
>
> Console.WriteLine("ClientApplicationID: {0}",
> e.ClientApplicationID)
> Console.WriteLine("UpdateIdentity: {0}",
> e.UpdateIdentity.UpdateID)
>
> Console.WriteLine("------------------------------------------------------------------")
>
> If i > 5 Then
> Console.Write("Press enter to continue...")
> Console.ReadLine()
> Console.WriteLine()
> i = 1
> Else
> i += 1
> End If
> Next
> Catch ex As Exception
> Console.Write(ex.Message)
> End Try
> End Sub
>
> Perhaps there is an ODBC driver to read EDB files?
>
> Anyway, look forward to seeing if you can come up with something!
>
> Regards,
>
> Glen
>
> "David Herman .:MVP:." wrote:
>
>> Glen,
>>
>> Can you provide more information with regard to what you want to do?
>>
>> That way I may be able to write some sample code etc for you.
>>
>> -David Herman
>>
>> "GlenConway" <gl*********@flarepath.nospam.com> wrote in message
>> news:1E**********************************@microsof t.com...
>> > Hi,
>> >
>> > Not sure where this post belongs so please excuse me if it's in the
>> > wrong
>> > group.
>> >
>> > I'm trying to use the WUAPILib.dll from Windows Update v5 with
>> > VB.NET.
>> > I
>> > can instantiate it locally fine but what I really need is to be able
>> > to
>> > do
>> > this remotely.
>> >
>> > My first thought was to use CreateObject:
>> >
>> > Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1",
>> > "XP-TEST1")
>> >
>> > This always returns "ActiveX Cannot Create Object".
>> >
>> > It's worth noting that the XP machine doesn't have SP 2 on it, I've
>> > just
>> > upgraded WU to v5. This rules out any firewall or enhanced security
>> > configuration issues.
>> >
>> > I thought it may be a DCOM configuration issue but when I looked on
>> > the
>> > XP
>> > box, it looks like the WU library doesn't support remote
>> > instantiation.
>> > Perhaps a way around this is to use WMI to instantiate the API
>> > locally
>> > but
>> > can WMI be used as a proxy?
>> >
>> > Any thoughts or pointers would be greatly appreciated.
>> >
>> > --
>> > --------------------------------------------------------------
>> > Flarepath Windows Update Analyser - download at
>> > http://www.flarepath.com
>> > --------------------------------------------------------------
>>
>>
>>


Jul 21 '05 #10
I want to get started and finish by the end of this weekend, i hope. May get
the dev team in WU at MS to take a look too, to make sure its up to scratch.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:10**********************************@microsof t.com...
David,

Look forward to it. Do you have any timescales?

Thanks

Glen

"David Herman .:MVP:." wrote:
I'm actually in the process of looking to write an app which does what
you
want with the added feature of removing existing record. I'll keep you
posted.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:B9**********************************@microsof t.com...
> David,
>
> Thanks for the reply. I need to be able to extract the update history
> from
> a WU v5 machine. As I said below, I can do it locally but I need to be
> able
> to do it remotely from a central machine. Previously, I could just
> parse
> the
> iuhist.xml file but v5 uses the JET database format (EDB).
>
> If you open up a new project and then add a reference to WUAPI 2.0 Type
> Library. The development machine needs to have WU v5 installed.
>
> Here is a quick sub to test the update history query:
>
> Private Sub updateSearcher()
> Try
> ' This will instantiate the api locally.
> Dim wu As New WUApiLib.UpdateSearcher
>
> ' This "should" instantiate it remotely
> ' Dim wu As Object =
> CreateObject("Microsoft.Update.Searcher.1",
> "XP-TEST1")
>
> wu.Online = True
>
> Dim i As Integer = wu.GetTotalHistoryCount
>
> Dim c As WUApiLib.IUpdateHistoryEntryCollection
>
> c = wu.QueryHistory(0, i)
>
> Dim e As WUApiLib.IUpdateHistoryEntry
>
> i = 1
>
> For Each e In c
> Console.WriteLine("Title: {0}", e.Title)
> Console.WriteLine("Operation: {0}",
> e.Operation.ToString)
> Console.WriteLine("Description: {0}", e.Description)
> Console.WriteLine("ResultCode: {0}",
> e.ResultCode.ToString)
>
> Console.WriteLine("ClientApplicationID: {0}",
> e.ClientApplicationID)
> Console.WriteLine("UpdateIdentity: {0}",
> e.UpdateIdentity.UpdateID)
>
> Console.WriteLine("------------------------------------------------------------------")
>
> If i > 5 Then
> Console.Write("Press enter to continue...")
> Console.ReadLine()
> Console.WriteLine()
> i = 1
> Else
> i += 1
> End If
> Next
> Catch ex As Exception
> Console.Write(ex.Message)
> End Try
> End Sub
>
> Perhaps there is an ODBC driver to read EDB files?
>
> Anyway, look forward to seeing if you can come up with something!
>
> Regards,
>
> Glen
>
> "David Herman .:MVP:." wrote:
>
>> Glen,
>>
>> Can you provide more information with regard to what you want to do?
>>
>> That way I may be able to write some sample code etc for you.
>>
>> -David Herman
>>
>> "GlenConway" <gl*********@flarepath.nospam.com> wrote in message
>> news:1E**********************************@microsof t.com...
>> > Hi,
>> >
>> > Not sure where this post belongs so please excuse me if it's in the
>> > wrong
>> > group.
>> >
>> > I'm trying to use the WUAPILib.dll from Windows Update v5 with
>> > VB.NET.
>> > I
>> > can instantiate it locally fine but what I really need is to be able
>> > to
>> > do
>> > this remotely.
>> >
>> > My first thought was to use CreateObject:
>> >
>> > Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1",
>> > "XP-TEST1")
>> >
>> > This always returns "ActiveX Cannot Create Object".
>> >
>> > It's worth noting that the XP machine doesn't have SP 2 on it, I've
>> > just
>> > upgraded WU to v5. This rules out any firewall or enhanced security
>> > configuration issues.
>> >
>> > I thought it may be a DCOM configuration issue but when I looked on
>> > the
>> > XP
>> > box, it looks like the WU library doesn't support remote
>> > instantiation.
>> > Perhaps a way around this is to use WMI to instantiate the API
>> > locally
>> > but
>> > can WMI be used as a proxy?
>> >
>> > Any thoughts or pointers would be greatly appreciated.
>> >
>> > --
>> > --------------------------------------------------------------
>> > Flarepath Windows Update Analyser - download at
>> > http://www.flarepath.com
>> > --------------------------------------------------------------
>>
>>
>>


Jul 21 '05 #11
Hi David,

Did you get anywhere with the code this weekend? Have you anything that I
can play around with?

Thanks

Glen

"David Herman .:MVP:." wrote:
I want to get started and finish by the end of this weekend, i hope. May get
the dev team in WU at MS to take a look too, to make sure its up to scratch.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:10**********************************@microsof t.com...
David,

Look forward to it. Do you have any timescales?

Thanks

Glen

"David Herman .:MVP:." wrote:
I'm actually in the process of looking to write an app which does what
you
want with the added feature of removing existing record. I'll keep you
posted.

-David Herman

"GlenConway" <gl*********@flarepath.nospam.com> wrote in message
news:B9**********************************@microsof t.com...
> David,
>
> Thanks for the reply. I need to be able to extract the update history
> from
> a WU v5 machine. As I said below, I can do it locally but I need to be
> able
> to do it remotely from a central machine. Previously, I could just
> parse
> the
> iuhist.xml file but v5 uses the JET database format (EDB).
>
> If you open up a new project and then add a reference to WUAPI 2.0 Type
> Library. The development machine needs to have WU v5 installed.
>
> Here is a quick sub to test the update history query:
>
> Private Sub updateSearcher()
> Try
> ' This will instantiate the api locally.
> Dim wu As New WUApiLib.UpdateSearcher
>
> ' This "should" instantiate it remotely
> ' Dim wu As Object =
> CreateObject("Microsoft.Update.Searcher.1",
> "XP-TEST1")
>
> wu.Online = True
>
> Dim i As Integer = wu.GetTotalHistoryCount
>
> Dim c As WUApiLib.IUpdateHistoryEntryCollection
>
> c = wu.QueryHistory(0, i)
>
> Dim e As WUApiLib.IUpdateHistoryEntry
>
> i = 1
>
> For Each e In c
> Console.WriteLine("Title: {0}", e.Title)
> Console.WriteLine("Operation: {0}",
> e.Operation.ToString)
> Console.WriteLine("Description: {0}", e.Description)
> Console.WriteLine("ResultCode: {0}",
> e.ResultCode.ToString)
>
> Console.WriteLine("ClientApplicationID: {0}",
> e.ClientApplicationID)
> Console.WriteLine("UpdateIdentity: {0}",
> e.UpdateIdentity.UpdateID)
>
> Console.WriteLine("------------------------------------------------------------------")
>
> If i > 5 Then
> Console.Write("Press enter to continue...")
> Console.ReadLine()
> Console.WriteLine()
> i = 1
> Else
> i += 1
> End If
> Next
> Catch ex As Exception
> Console.Write(ex.Message)
> End Try
> End Sub
>
> Perhaps there is an ODBC driver to read EDB files?
>
> Anyway, look forward to seeing if you can come up with something!
>
> Regards,
>
> Glen
>
> "David Herman .:MVP:." wrote:
>
>> Glen,
>>
>> Can you provide more information with regard to what you want to do?
>>
>> That way I may be able to write some sample code etc for you.
>>
>> -David Herman
>>
>> "GlenConway" <gl*********@flarepath.nospam.com> wrote in message
>> news:1E**********************************@microsof t.com...
>> > Hi,
>> >
>> > Not sure where this post belongs so please excuse me if it's in the
>> > wrong
>> > group.
>> >
>> > I'm trying to use the WUAPILib.dll from Windows Update v5 with
>> > VB.NET.
>> > I
>> > can instantiate it locally fine but what I really need is to be able
>> > to
>> > do
>> > this remotely.
>> >
>> > My first thought was to use CreateObject:
>> >
>> > Dim wu As Object = CreateObject("Microsoft.Update.Searcher.1",
>> > "XP-TEST1")
>> >
>> > This always returns "ActiveX Cannot Create Object".
>> >
>> > It's worth noting that the XP machine doesn't have SP 2 on it, I've
>> > just
>> > upgraded WU to v5. This rules out any firewall or enhanced security
>> > configuration issues.
>> >
>> > I thought it may be a DCOM configuration issue but when I looked on
>> > the
>> > XP
>> > box, it looks like the WU library doesn't support remote
>> > instantiation.
>> > Perhaps a way around this is to use WMI to instantiate the API
>> > locally
>> > but
>> > can WMI be used as a proxy?
>> >
>> > Any thoughts or pointers would be greatly appreciated.
>> >
>> > --
>> > --------------------------------------------------------------
>> > Flarepath Windows Update Analyser - download at
>> > http://www.flarepath.com
>> > --------------------------------------------------------------
>>
>>
>>


Jul 21 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hans G via DotNetMonster.com | last post by:
Hi, I want to use the wuapilib.dll for asking the official UpdateService daily for new updates for different OS. I don't want to ask other computers what updates they have installed or something...
6
by: GlenConway | last post by:
Hi, Not sure where this post belongs so please excuse me if it’s in the wrong group. I’m trying to use the WUAPILib.dll from Windows Update v5 with VB.NET. I can instantiate it locally...
0
by: =?Utf-8?B?anRva2FjaA==?= | last post by:
Hi, I can't for the life of me figure out how to use the ICategory interface of the WUAPILIB. Specifically, I would like to read the type property. MSDN Link:...
2
dekaaditia
by: dekaaditia | last post by:
I Want to make patches system using visual basic .NET But i have some error exception in my code Here is my code Public Class Download Public Shared Sub Download(ByVal str As String)...
0
by: Brian | last post by:
Hello, I'm having a little trouble with the Windows Update Agent API (WUApiLib). I've got code working that pulls back a list of updates from Microsoft, but they're specific to the system I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.