Simulate ClickOnce

hello,

for a winforms .Net application in our intranet I would like to move from the current ClickOnce update function to wyBuild. There is no need for an initial install of the app - this will be done by IT. But I would like to automatically update the application everytime the user launches the app if there is a newer version available, without giving the user any option to skip etc.I went through the tutorials and the forum but couldn't find a short and effective way to achieve this.

Many Thanks for you helpTorsten

If you look at my most recent post, asking for help, you'll see 2 methods that you can use. You'd use them like;

int newUpdateAvailable = CheckForNewUpdate(updateFilePath); SilentUpdate(newUpdateAvailable, updateFilePath); //updateFilePath is the path to the wyUpdate.exe that is created when you run wyBuild //at the end of the SilentUpdate method, you'd just make a call to exit your application //using the /fromservice switch will cause it to update without the user interacting

Hope this helps

The best thing to do is go through the step-by-step walkthrough. Since you want to do synchronous checking (checking before the user runs the app) then you should use wyUpdate in "standalone mode" (see: How to Silently Check for Updates) instead of the AutomaticUpdater.

Tell me if that helps.

I have a similar issue, but reading through the referenced article, your idea of "silent" and my idea of "silent" appear to be different 🙂. Our app (C#, winforms, .Net 4.5, Win7) runs on dedicated hardware, and starts up and takes over at boot. It also assumes there is no one around running it, and we do not allow third party pop-ups. So, doing a "silent" install means that the updater does not get a UI. At all. All of the articles I saw talk about doing a silent check and exit if there is nothing, but if there is an update, popping up a nice big window. Or you add a UI element to the app and it displays a status.

At app start, we can check for updates, if one is found we can make the app wait while it downloads and restarts, that's not a problem. The problem we have found is that because our app starts before the wifi is available, much less connected, we are pretty picky about how that happens. ClickOnce (which we just put in, and will now probably be taking back out) almost works, but it does it's initialization at app start, and if there is no network, never checks again, which is obviously a big problem for us. Looking at all of your steps, everything I see pops up a progress UI, or displays something somewhere to the user.

Is it possible for the app to check for updates, download an update, and either apply it at next launch (and we're starting from a reg entry, not a click) or restart the app when it's at a "safe" spot, and leave all the UI stuff up to the app itself?

Yes, run wyUpdate from a dummy Windows Service and the UI will be completely hidden. This is covered in "FAQ: How can I completely hide the updater (wyUpdate)?".