Test an Update without Deploying it

Is there a way to test an updater file without actually uploading it to our site?

For instance, wyUpdate.exe /magiccommandlineswitch some.update.file.wyu

I found something by reading the source code to wyUpdate on google code

This works from a batch file:wyUpdate.exe /server="file://%~dp0\wyserver.wys"

You have to copy the .wys file and the .wyu files into the same place.

All together in the same folder:1) this batch file with that one line in it2) the wyserver.wys file3) the .wyu file4) the application to update (the .exe of your app)5) wyUpdate.exe6) client.wyc

This works from a batch file:wyUpdate.exe /server="file://%~dp0\wyserver.wys"

Yes, using the -server commandline switch will work. Just upload the updates to your server. Or if you want to test everything locally before deploying to your server then use updatepath.

If I omit /server and just use /updatepath, it says: You have the latest version already installed.

It didn't work. It was late. I didn't check well what I wrote last night:

The following command causes the .wys file to get downloaded, but when I let the process continue, it just errors out (can't download the file because it's using the original server name)

update.exe /server="file://%~dp0/wyserver.wys"

When I do this, it throws the same exact error (gets the local wys file, but gets the remote wyu file)

update.exe /server="file://%~dp0/wyserver.wys" /updatepath="file://%~dp0"

When I do this, it also throws the same exact error (gets the local wys file, but gets the remote wyu file)

update.exe /server="file://%~dp0/wyserver.wys" /updatepath="file://%~dp0/nameofproject.all.to.verisionnumber.wyu"

I found a clue.... In the source for wyUpdate, file ServerFile.Load.cs, around line 88:

string updateSite = ReadFiles.ReadDeprecatedString(fs);

if (updatePathVar != null) updateSite = updateSite.Replace("%updatepath%", updatePathVar);

updateSite = updateSite.Replace("%urlargs%", customUrlArgs ?? string.Empty);

That code appears to expect tokens in the updateSite string. Those tokens do not exist. So the update path never gets overridden by the command line switch.

In the .wyp project file, are we supposed to use tokens somewhere? It doesn't appear so.

I think this code should have been like this:

if (updatePathVar != null) updateSite = updatePathVar;

And then maybe add some stuff to make sure we have .wyu file mentioned on the path.

What am I doing wrong?

Don't hardcode the filename in the updatepath. It doesn't work like that. If you read the help article it shows how you should do it.

The download site should look like this:

%updatepath%/%file%

Then pass the updatepath to wyUpdate.

wyUpdate.exe -updatepath="http://example.com/updates"

Thanks Wyatt! That helped and cleared things up!!

For reference to anyone who reads this later, this is what worked for me:

1) Configure two download sites in the .wyp file (A is for production and B is for local updates)A) http://www.mysite.com/specialplace/%file%B) %updatepath%/%file%

2) I still needed two command line switches in my batch file:wyUpdate.exe -server="file://%~dp0/wyserver.wys" -updatepath="file://%~dp0"