Change update location and disable updates

I'm building a client side application in c# that should update from internal application server that obviously has different address depending on customer installtion.

Right now I've managed to override update location like this on application startup:automaticUpdater1.wyUpdateCommandline = String.Format("-server=\"{0}{1}\"", jc.BaseUrl, "/download/wyserver.wys");I want to make sure if this is the correct way to go.

Another thing is that just before setting this URL I'm making a check if my app can connect to that server and access some services using provided credentials. If that fails URL is not set (on purpose) and I would like to disable checking for updates until the connection is established. Is there a way to turn wyUpdate on/off?

Right now I've managed to override update location like this on application startup:automaticUpdater1.wyUpdateCommandline = String.Format("-server=\"{0}{1}\"", jc.BaseUrl, "/download/wyserver.wys");I want to make sure if this is the correct way to go.

Yep, that's the right way to do things. The code looks about right too (though I didn't check it in a compiler).

Is there a way to turn wyUpdate on/off?

Set the AutomaticUpdater "UpdateType" property to "DoNothing" in the constructor of your app.

Thanks. Code compiles, I wasn't sure if I picked the correct command line argument 🙂And UpdateType is exactly what I was looking for. Thanks.

One more question. I pass my server argument and this works fine. But, I'd like to achieve the following:wyUpdate checks on my customer server location (the one from argument) for newest version (let's say I have version 1 installed and newest available there is 3)it tries to update but there's no update (wyu file) from 1 -> 3 only 2->3.Now I'd like wyUpdate to go to another location on my website where all updates are available. But there the newest version will be 5. I still wan't it to update to 3 only (since that's the most recent version for given customer).I hope the scenario is clear enough 🙂Do you know if that's possible and how to apply it?

I'm not really sure what you're trying to accomplish. Can you step back and speak about the grand overview of what you're trying to do. Are you trying to limit updates for users to a specific version?

Yes, you can say that I'm trying to limit updates. Here's the full scenario.

I have application in Java that is deployed on web server at customer location. Customers can update this java application themselves to any version that I've released or decide not to update it.

Inside this Java app is a downloadable resource with client side application in C# - installer + wy server and wyu files.C# app has wyUpdate control that points to this customer web server (using "server" command line argument).

Now I need to make sure that if web server admin decides to update Java app all the client machines will get the matching client side version. This is ok so far as I'll bundle all the wyu files for some time. But I guess at some point I'll have to clean them up (they'll take more and more space) and leave only the "latest updates" - let's say that around version 25 I'll remove from Java app package all the updates from versions <20. It's very important that versions must match - if I release version 25 but customer makes upgrade of Java app from version 10 to 23 the client side must be updated to version 23.

I still want end users to be able to update automatically so it would be nice if in such case, when wyu files are not available at customer web server (e.g. they upgraded from version 10 to 25) my client side app could point them to my remote location. I also need make sure that this process is handled differently as some customers don't want to download updates from outside corporate network due to security policies - so when wyu files are not available I just want users to be notified about that and make them manually apply the update, while when wyu files are in corporate network they should be updated automagically 🙂Hope it makes more sense now - or maybe I've overcomplicated this.

This is a truly complicated scenario, and I can't think of an easy way to handle this. Why can't your users stay upgraded to the latest version?

It's mostly a matter of licensing, support and compatibility with the host application (my Java app is a plugin for another system). I believe it needs to be handled in similar way but for now it's not that critical - maybe you'll find some solution in next releases of wyUpdate.

Thanks for help 🙂