wyUpdate fails and overwrites itself

I have a problem with wyUpdate on Windows 8/2012. This problem does not appear on previous versions of Windows.

In typical usage we invoke wyUpdate through a wrapper but the problem appears to be exactly the same when done with the GUI approach. We use full updates, built with wyBuild.

1) I start wyUpdate. The bundled wyUpdate is 2.6.18.0 and the server wyUpdate version is 2.6.18.4. It correctly detects that a version of the application itself is required and downloads it. 2) It stalls on updtdetails.udt and cancels the installation. The error message is "The directory is not empty"3) Looking at the wyUpdate.exe file in the application directory reveals that this file has been overwritten with the first .NET 'executable' found in the update package - a 9kb file that has nothing to do with wyUpdate.

I'm poking through the source code at the moment, so perhaps it'll reveal itself but I find this to be a rather odd problem 😉 If anyone have any ideas, I'd love to hear them.

Thanks for your time.

So you're doing your own wyUpdate self-updates? Only put 1 exe in the self-update - wyUpdate.exe. Or modify the self-update code to handle your custom self-update packages.

Or just use our version of wyUpdate and let wyUpdate self-update itself using our code and versions.

Hi, thanks for the reply.

We do not seem to have implemented our own self-update and I'm confused about how this works (there was no documentation from the guy that did this in the first place and he left long ago, typical story...). I can see that the generated client.wyc file does require a minimum version of wyupdate 2.6.18.4 and the application-bundled wyupdate is 2.6.18.

I can see the following (slightly abbreviated) lines in the log of the webserver that hosts the updates:08:38:30 127.0.0.1 GET /wyserver.wys - 80 - 127.0.0.1 Mozilla/5.0+(Windows;+U;+MSIE+9.0;+Windows+NT+6.1;+en-US;+wyUpdate) - 200 0 0 008:38:30 127.0.0.1 GET /wyserver.wys - 80 - 127.0.0.1 Mozilla/5.0+(Windows;+U;+MSIE+9.0;+Windows+NT+6.1;+en-US;+wyUpdate) - 200 0 0 008:38:35 127.0.0.1 GET /app.all.to.2.8.1.wyu - 80 - 127.0.0.1 Mozilla/5.0+(Windows;+U;+MSIE+9.0;+Windows+NT+6.1;+en-US;+wyUpdate) - 200 0 0 62

This looks correct to me? It then runs through the package, cancels on updtdetails.udt and then exits, and has replaced the wyupdate.exe file with the first binary found in the update package. I can't find anything about "self-update" anywhere, and wyupdate.exe is not part of the update package - I've unzipped it and checked.

Hep, I figured it out - wyserver.wys was set as the update for wyupdate as well 😉 I'm actually slightly confused to how they ever made it work but no matter.

Thanks for your reply again. Despite that it was a really odd case, it helped point me in the right direction.

Great, glad you figured it out.

Hep, I figured it out - wyserver.wys was set as the update for wyupdate as well 😉 I'm actually slightly confused to how they ever made it work but no matter.

Thanks for your reply again. Despite that it was a really odd case, it helped point me in the right direction.

How did you take it (wyupdate.exe) away from wyserver.wys ??

I'm not sure what you're asking. Can you clarify the problem you're having and what you expect to happen?

Well, wyUpdate fails and overwrites itself on win7 machine.All was working before last wyBuild update. I made a new version of software and build new server files with wyBuild. First time update works. then made another version and server files --> update won't work. * Checked wyUpdate.exe and it has changed to this new version of software. (right clicked and looked in properties). * Checked C:\Users\[USER]\AppData\Local\Temp\w4696 and there was wyUpdate.exe with selfUpdate.sup

I copied wyUpdate.exe back to my programs directory and tried on commandline.It prompts rigthly to click Update to begin (all version info is correct).Whe started update process it states Downloading new wyUpdate and stops and wyUpdate.exe is become my program. My program is a windows service so after wuUpdate updates it self it won't start obviously.My point is how to tell wyUpdate.exe to not update it self.

  1. Are you including wyUpdate.exe in your update? (Don't. It will fail.)
  2. Are you making your own version of wyUpdate? (Don't -- not unless you understand the entire self-updating process).

1. My files and folder in wyBuild has not wyUpdate.exe anywhere2. I am using wyBuild to build wyUpdate and UpdatesSo i am not including wyBuild on update and not doing my own wyUpdate..

Well, wyUpdate fails and overwrites itself on win7 machine.

What's the failure? Please copy and paste the full error. At what point does the failure occur? What version of AutomaticUpdater & wyUpdate are you using?

just found it out, wyserver.wys was set as the update for wyupdate as well on wyBuild properties wuUpdate sitelist.Just a stupid error in my settigs..

We have just come across that same issue after 19 successful updates with the same settings.

When the update runs it fails on "The updated version of wyupdate required to update [our prouduct name] failed to install. We are running a custom version of wyupdate (just different icon and executable name only) from source, the build version is 2.6.18.0 and has been all along.

When the update failed its overwritten by the first executable in the update (with a different file size though)

Under Properties -> wyUpdate Tab i have added a site http://[our domain]/update/connect/custom-wyserver.wys and under the Update & Server files Tab I have Server file name set as custom-wyserver.wys

In the project tab -> Download Sites i have http://[our domain]/update/connect/%file% set as both server and update site.

I haven't uploaded our custom version to the url as its included in our installer and updates and has been all along.

Why is this happening now?

Likely because wyUpdate couldn't contact your website, and thus couldn't self-update. Make sure the customer isn't blocking your website. Also, make sure your website is up. Also, make sure your website is actually serving the files correctly.

The files are hosted on Amazon S3 and are publicly accessible. I have tried multiple machines in multiple locations. The other error message displayed is "directory is not empty".

How can we progress this issue to resolution?

I have noticed the following on your website

Secure Update Rollback on ErrorsYour users will always have working software. For instance, if the user cancels a software update, or an unforeseen error occurs while updating, wyUpdate quickly and cleanly restores the previous version of the software. It never leaves extras files or registry lying around.

This is currently factually incorrect as this issue has proved in some circumstances it doesn't fail safe.

Are you including wyUpdate.exe (or whatever you've renamed it as) in your regular app update? If so, that's wrong. Don't do that. We actively warn you about that in the documentation, and if you don't rename wyUpdate.exe then wyBuild stops you from doing that.

The only place you should ever include wyUpdate.exe (or whatever you've renamed it as) is in your self-update project.

If you're still getting problems then you need to give us a whole lot more information before we can help you. And reproducible steps are ideal.