PDA

View Full Version : updating using COM



Ganesh Iyer
05-14-2002, 02:29 PM
Hi
Has anyone tried using the COM i/f to call update service.

I tried the appupdate call and was told by
tech support to try auto update.
basically i need to silently update my client

any code samples will help
-thanks

Chris Woerner
05-14-2002, 03:38 PM
AppUpdate() can check for an update silently, but it will always show a user interface when it finds an update.

If you need to download and install the update silently, you will need to use AutoUpdate(). Using AutoUpdate(), your application will receive back status events. You can either present an alternative UI or no UI. Your choice.

Of course, your update will also need to be authored to run silently. You can use the command line option when you publish the update message on the website to specify any needed silent switches.

One word of caution, if your files are in-use when you try to update them, the installer will try to reboot. Make sure you test for this. It would be a bad customer experience to have a sudden and unexpected reboot.

Are you looking for C++ or VB code samples? VB code samples can be found in the Update Service Help. Do a search on AutoUpdate().

Ganesh Iyer
05-14-2002, 03:46 PM
I need the C++ examples.
What I'm planning to do is
if(update)
1. save info
2. shut down
2. uninstall
3. run/call auto update
4. merge old info to new (could be part of the install)
5. start


This way I would not need to restart the machine

Could you please post the url for the vb code

-Thanks

Chris Woerner
05-14-2002, 04:08 PM
The sample VB code is located in the help, which is part of the Update Service SDK. The SDK can be downloaded from the Update Service website. The download link is on the home page, right after you login.

---------

So in your user scenario, the user would see a message that says, "a required update is available, click OK to shutdown the application and apply the update". Once the user clicks OK, the application would be uninstalled, the update would be downloaded and installed and the application would restart. The download and installation would be done silently. Am I correct?

If you don't mind me asking, why no UI for those steps? Would it confuse the user when the user sees "nothing" happenning? Might the user try to restart the application?

Ganesh Iyer
05-15-2002, 09:50 AM
the client we have runs on remote machines that
nobody logs into all the time.

I do not even want any user ok to start the update.
the old program periodically checks and updates when
there is an update.

It does talk to the mother ship periodically.
So I can trigger the client to look for updates if needed

I will look into the vb code today
Thanks