PDA

View Full Version : Call the Update Service from a .NET application?



balexander
06-06-2003, 01:07 PM
I'm having difficulty calling AppUpdate() from within my .NET application and was wondering if anyone had some recommendations on how it should be done.

I've tried using InterOp to the DWUpdateServiceLib.Agent but my test install machine is throwing an InvalidCastException when I try to instanciate the Agent.


On a separate note, when I run my application in debug mode on my dev machine, the Agent dialog reports that my product isn't registered--but I'm using the same GUID as that provided by my install and it IS registered on the Update Service site. Am I missing something here?

Thanks,
Balex

Chris Woerner
06-06-2003, 01:41 PM
I can help you with the second part of your posting...

When you run the installation of your application, the installation does the "registration" of your product with the Agent on your local machine. This is necessary so the local Agent knows about your application before you call it. The local Agent needs to know how to read your product version. It gets this information from the installation.

balexander
06-06-2003, 02:02 PM
Thanks, Chris! I ran through the installation of the app and it is now properly registered with the local Update Service. Now AppUpdate() works correctly on my dev machine.

Can you offer any guidance as to why my Interop with DWUpdateServiceLib isn't working (on my "clean" test machine)? Does InstallShield have any .NET code samples or anything I can work from?