PDA

View Full Version : Update Service and VB Intergration



Tim.Ford
05-21-2003, 03:49 AM
Hi Guys,

I have created an installation and all works well, the problem seems to occur once i have install the application, on to a machine that does not have the Installshield SDK installed, If i attempt to run the update service from VB within my application i get an

Class Automation error. I am including the Update service runtime and also registering the application with the update service.

Any help would be appreciated.

Thanks Tim.

Christine at IS
05-21-2003, 09:44 AM
Hi Tim,

Just to confirm...if you install the SDK on this machine where you are getting the error - it starts to work?

Also, a few other questions:

What calls are you making to the Update Service from your VB app? And, do you know at what point the error is occuring?

Are you including the VB Runtime in your installation?

If you are using the 2.00 SDK, did you include both agent.exe and ISDM.exe as references in VB?

Thank you for the additional information...
Christine

Tim.Ford
05-21-2003, 09:52 AM
If i install the SDK on the end machine the update service work s fine. I have got 1 reference in VB and that is to the DWUpdateService 1.0 Type Library.

Here is the code i have in VB

Dim objUpdateAgent As New DWUpdateServiceLib.Agent

On Error GoTo ERR_HANDLER

objUpdateAgent.Register mobjContext.Deployment.ProductID, mobjContext.Deployment.ProductVersion
objUpdateAgent.AppUpdate mobjContext.Deployment.ProductID, AppMenu
Set objUpdateAgent = Nothing

Exit Sub

ERR_HANDLER:

MsgBox Err.Description, vbCritical + vbOKOnly, "Update Service"

The class automation error is being raised on the "New" statement, i know why this is happening it can't create the instance of the agent object as the files are not installed. But i though i only need the DWUpdateService reference.

Hope this help.

Tim.

Christine at IS
05-21-2003, 09:58 AM
Are you using the 1.21 SDK or the 2.00 SDK?
If you are using 2.00 SDK, you will also need the reference: ISDownloadManager 1.0 Type Library.

On the machine getting the error, were you able to confirm that agent.exe and ISDM.exe are getting installed to?
..\Common Files\InstallShield\UpdateService

Thanks,
Christine

Tim.Ford
05-21-2003, 10:11 AM
I didn't have the reference to the ISDownloader, so i will try that.

Thanks again for your help.

Tim