How do i change Download Sites on client.wyc file

Hi wyBuild Team,I'm make some progress with wyBuild but i wonder how change Download Sites on client.wyc file. I tried to open it by notepad or by code File.Read to change Download Sites to another site because my app can be use by other server but it was encoded. Exp: MyApp can be updated from Alpha server or Beta server. My purpose is that we just need build one time on wyBuild and deploy to 2 server - i think we just need change Download Sites on client.wyc file, right?Please answer me asap 😢 .Thanks.

Change the download site in wyBuild, then click "Build wyUpdate". This will set the new download sites in the client.wyc file. Then you can include the client.wyc in your update and your customers will get the new download sites.

Change the download site in wyBuild, then click "Build wyUpdate". This will set the new download sites in the client.wyc file. Then you can include the client.wyc in your update and your customers will get the new download sites.

Thanks Wyatt,But i know this tip, my issue is i want to change Download Site on client.wyc ( and wyserver.wys i think) programmatically. My client want wyBuild has ability to build one time but can be used for multiple server.Do you have any tip to open client.wyc and wyserver.wys, i still want to open client.wyc to change Download Site to destination site.Regards.

You can always specify "override" servers by using -server="<url>", -updatepath="<url>", -urlargs="<string>", etc.

You can always specify "override" servers by using -server="<url>", -updatepath="<url>", -urlargs="<string>", etc.

thanks Sam, very useful information.I tried these command but it just "override" download site one time when you call command line and pass parameter. My wish is i can run command with passing destination download site that it can change download site on client.wyc permanently. Is there any way to open and change client.wyc file by code?Regards.

Is there any way to open and change client.wyc file by code?

No, not without parsing the file format and modifying it.

Is there any way to open and change client.wyc file by code?

No, not without parsing the file format and modifying it.

Oops i'm stuck now 🙁Is there any solution for my request?

I can't see the purpose if modifying the client.wyc permanently outside of wyBuild. Either modify it in wyBuild, or make it a variable download site and pass in the the dynamic url when you run wyUpdate.

I can't see the purpose if modifying the client.wyc permanently outside of wyBuild. Either modify it in wyBuild, or make it a variable download site and pass in the the dynamic url when you run wyUpdate.

As my app designed, it app can be run on multiple internet or intranet server (with wcf services and updates folder), the problem is my clients just want to build updates via wyBuild one time and it can be used for all server with different download site url. Let imagine if you have 100 servers like this, you have to build 100 times on wyBuild to just change download site url EVERYDAY - it's critical issue for us 😢 .I love wyBuild after 3 days R&D it (although it still got some error and crash sometimes).I'm really appreciate your support. Hope you guys can resolve my issue.Thanks

As my app designed, it app can be run on multiple internet or intranet server (with wcf services and updates folder)

This is the point of the updatepath variable/commandline option. For example, let's say you're deploying your app that will be used in 2 completely different circumstances:

  1. A regular downloadble app that will be updated from your website (that is, the updates are hosted on your site).
  2. An app installed to an intranet that doesn't have internet access thus the updates will be "downloaded" from a local intranet share.

You do not need to have 2 separate client.wyc files for this case. Just set your download site to "%updatepath%/%file%" (instead of what you'd normally type, something like "http://example.com/%file%"). Then you simply pass the updatepath to wyUpdate (or if you're using the AutomaticUpdater you pass it to wyUpdate using the wyUpdateCommandline property).

So, in the example I provided you'd have the "default" updatepath be "http://yoursite.com/path/to/updates":

wyUpdate.exe -updatepath="http://yoursite.com/path/to/updates"

Or, in the AutomaticUpdater:

au.wyUpdateCommandline = "-updatepath=\"http://yoursite.com/path/to/updates\""

For the local intranet example you'd pass in the folder or network share where the update files will be hosted. Let's say the files are hosted on a network drive "X:\YourApp\Updates". You'd pass this to wyUpdate.exe like so:

wyUpdate.exe -updatepath="file:///x:/YourApp/Updates"

Or, in the AutomaticUpdater:

au.wyUpdateCommandline = "-updatepath=\"file:///x:/YourApp/Updates\""

Does that make sense? You don't need to modify the client.wyc file. You're trying to solve the problem in the wrong way. Use our commandline options. Trust me, we have thousands of customers who do just what you're asking and the commandline options work perfectly.

If you absolutely must write to a file, then write a shortcut file that calls wyUpdate with the correct updatepath commandline option.

I love wyBuild after 3 days R&D it (although it still got some error and crash sometimes).

Please copy & paste the exact crash error you get, tell us how it happened, what machine you're using it on (OS, CPU type, etc.), and how to reproduce the error. We'll fix it if you can provide us at least some of the details. (The more details you provide the easier it is for us to find & fix bugs).

So many thanks Wyatt,I will follow your suggestions, seem so good 😉

it works perfectly now 🤣 But seems i can't get version number of AutomaticUpdate(WPF) after it checked the current version is the latest version. Please review my code: private void AutomaticUpdateItem_UpdateSuccessful(object sender, wyDay.Controls.SuccessArgs e) { this.CurrentVersion = e.Version; // always null }

private void AutomaticUpdateItem_UpToDate(object sender, wyDay.Controls.SuccessArgs e) { this.CurrentVersion = e.Version; // always null }

I think i can get version number from UpToDate and UpdateSuccesfully event but e.Version always null.And can i change wyUpdate.exe to another name?Regards.

And can i change wyUpdate.exe to another name?

Yes. Be sure to update the wyUpdateLocation property on the AutomaticUpdater to point to your new exe name.

private void AutomaticUpdateItem_UpdateSuccessful(object sender, wyDay.Controls.SuccessArgs e){this.CurrentVersion = e.Version; // always null}


private void AutomaticUpdateItem_UpToDate(object sender, wyDay.Controls.SuccessArgs e){this.CurrentVersion = e.Version; // always null}

This works here. What happens when you try the automaticUpdater.Version property from within those 2 events?

Oh i want to update version on my app and store to database too. I checked AutomaticUpdater1.Version on AutomaticUpdateItem_UpToDate but it was null 🙁.And i found an error when working with wyBuild, reproduce steps:1. Build Updates (with some large file) and Cancel.2. And now 2 button "Build wyUpdate" and "Build updates" were disabled. I tried to re-open project but they were still disable and throw error.

It sounds like your installation of wyBuild is corrupt. Download wyBuild from our website. Only ever download wyBuild from our website. There are no authorized re-sellers and no authorized distribution sites.

Also, always use the latest version. Currently 2.6.18.4.

Hi Wyatt,I use latest version of wyBuild,https://picasaweb.google.com/110613823846143238300/OtherStuff#5805032257253007602 please review my screen cast to see the Version is always nullhttps://picasaweb.google.com/110613823846143238300/OtherStuff#5805032252015243906

Thanks.

We can't reproduce this. Send us a project that reproduces this error. Give us the full source code so we can see what you're doing.

Also,

2. And now 2 button "Build wyUpdate" and "Build updates" were disabled. I tried to re-open project but they were still disable and throw error.

Give me the error you're getting.