PDA

View Full Version : Interesting requirement


brianthegood
11-14-2008, 05:36 PM
So I have a nice updater client and server that I've created.
It can be launched from
1) A shortcut of the Start Menu
2) The application that it is serving (Help --> Check for Updates)
Both are verbose and have screens.

What I was hoping for was a way to launch this from within a stub application that starts before the main app. When launched from this stub, I would like the handshaking to be silent unless there is an update.

Is there a way to pass an argument to the updater to tell it to run in quiet mode and go visible if an update is detected?

Ulrich
11-14-2008, 06:06 PM
When you use the Wizard to create a new project, on the second dialog you find an option to create silent updaters: Mark the checkbox "Don't show any interface unless an update is available."

If you already created your project, it would be best to create a new one with this option checked, and then see what you have to include in your own project to make it work. Especifically, note the usage of g_SilentUntilUpdateAvailable in the scripts...

You could pass a command line parameter to bybass this variable when your customer calls the updater from inside the program, so he will get informative screens even if there is no update available. Otherwise he could think that nothing happened as he clicked the option in the menu.

Ulrich

jassing
11-15-2008, 01:18 AM
What Ulrich said will definately do it for you -- but are you wanting to make an existing bit of code also run silently?

There's a few ways to do it; what I think is easist is to create a silent version; then add in the dialogs you really want; rather than try to make a screen (wizard) based project run silently.

Have you highly customized your project? or can you redo it easily?

brianthegood
11-18-2008, 01:22 PM
I've already created the project and it has deployed in a trial offering of the main app.

I'm not sure right now what an update will do after the trial period.
I think I will experiment with a new quiet client and push that once the trial period is over.

If I delete my old project and migrate the name to the new project, is there a way to migrate the Encryption Key so that the old client will attempt to update itself to the new 'quiet' client?

I'd like to see a bit of code that uses the g_SilentUntilUpdateAvailable variable. Where and how is it set in order for me to use it in my logic?

By the way, many thanks for the support!

jassing
11-18-2008, 04:03 PM
I've already created the project and it has deployed in a trial offering of the main app.

I'm not sure right now what an update will do after the trial period.
I think I will experiment with a new quiet client and push that once the trial period is over.

If I delete my old project and migrate the name to the new project, is there a way to migrate the Encryption Key so that the old client will attempt to update itself to the new 'quiet' client?

I'd like to see a bit of code that uses the g_SilentUntilUpdateAvailable variable. Where and how is it set in order for me to use it in my logic?

By the way, many thanks for the support!


YOu can copy the key over to the new project; but if you change the name; then no; not really -- you'd need to have a true update client that 1st upates updates itself; then downlaods the new named update client; then do the udpate checs...

regarding g_SilentUntilUpdateAvailable - do what ulrich suggested; just build a new project and select the checkbox "Silent until upate available"

brianthegood
11-25-2008, 03:00 PM
So I took an up-the-middle approach.

I created a silent project, grabbed the client code from there and placed it in my original project. I then created a registry entry that I read upon starting the client that decides whether I want to run silently or not. That registry value can be set by different applications.

Did I re-invent the wheel or just add a fancy hubcap?