wyUpdates failes to update

Hi

I have a problem with wyUpdate 2.6.13.0.The problem is following:I have some software (windows service) installed in Progam Files folder and have wyUpdate.exe next to the software files.software is programmed to update itself via "wyupdate.exe -fromservice" command line.when the command is executed from the software it returns exit code 1 (wyupdate error) and does not update anything. but when the command is executed from cmd.exe shell then I see the wyUpdate GUI (!? why? there is "fromservice" option..) and update goes ok. as far as i know wyupdate does not write any log. how can i figure out the problme with updating from service?

TIA

Ivan

Hey Ivan,

We'll add a log feature for the "-fromservice" mode for wyUpdate 2.6.14. In the meantime, if I were to guess the problem, it's one of 3 things:

  1. You're running processes in one of the folders you're trying to update. For example, your service is still running after you launched "wyUpdate.exe -fromservice". Or maybe you have other processes running in that directory.
  2. One of the files to be updated is in use by another process.
  3. You're not running a "LocalSystem" service. (Note that "LocalSystem" is different than "LocalService" -- you must run your service as "LocalSystem".)

Tell me if this helps.

Hi

Thanks for the response. The service, definitely, is runing as LocalSystem. I'll try to dig deeper into the first two points.

Thanks again. Looking forward for wyUpdate 2.6.14 and logging 🙂

btw, I have side question.

Will updating and "wyupdate -fromservice" in particular work if a service is running not as LocalSystem but using account which has Admin role for target pc and "Logon as a service" privilege?

ThanksIvan

Maybe. So long as the "admin" user isn't a neutered admin user (using Group Policy Editor or any other method). For instance if you create an admin account and remove some of its privileges then wyUpdate will still see it as an admin user. It won't notice the account is really an admin account with limitation. This is bad.

When you run a process from any program (or service) it inherits the privileges of the program (or service). So, if your special service has "admin" privileges then everything should work fine. But it's probably best just to set your service as a LocalSystem service and don't use any special tricks to run wyUpdate as any other user.

wyBuild 2.6.14 is now out. You can use the "-logfile" argument to output the end result to a text file. For instance:

wyUpdate.exe /fromservice -logfile:"C:\filename.txt"

Please, add more extensive logging in all modes. It'll be much easier to hunt down problems.

The log currently shows the full error. What error did you have, and what information could you have used to solve the problem sooner?

well, I am not updating from service, just using the AutomaticUpdaterBackend from a wpf application. The problem I experience is that "wyUpdate.exe" apparently does not write to the ".autoupdate" file in the "wyUpdate AU" folder after it updates the application and so the next time the application is started (wyUpdate.exe does not restart it either) and the AutomaticUpdaterBackend is initialized, it's ClosingForInstall property is True and the app logic is not to continue, but wait for CloseAppNow event, which of course is never received :/I do not know what is going wrong and a log files both from the AutomaticUpdater and wyUpdate.exe would have been extremely helpful.

Are you using wyUpdate.exe in both standalone mode and with the AutomaticUpdater? That is, are you running wyUpdate.exe directly?

No, did not run "wyUpdate.exe" directly, will it make a difference if run directly ?I am doing clean installation of an old version (so no old stuff left) and this happens on the very first update - for some reason the ".autoupdate" file is not updated from "wyUpdate.exe"

Ok, wyUpdate doesn't handle this case and it should. For instance, let's say you have version 1.1 installed and then you download the updates to version 1.2. Then let's say you uninstalled your app and installed version 1.0. The AutomaticUpdater will try to install version 1.2 even though it will fail.

Obviously wyUpdate should detect this case and see that your base version has changed since it started the update process. We'll fix this soon. Thanks for reporting it.

Please, add more extensive logging in all modes. It'll be much easier to hunt down problems.

YES PLEASE!