Use AutomaticUpdater in dll

Hi

I have an application developed as a COM dll that runs as a plugin inside an exe application. I integrated AutomaticUpdater in the dll to provide updates of my application, as I have no control about the exe application as is another company product..

Checking for updates is fine, but when you select to install the update, the control closes the exe application but next time the application is launched the update process seem no being executed (Not sure how is managed this in AutomaticUpdater). Is not possible to use AutomaticUpdater in this context?

Also after restart the application, when trying to check again for new versions the process fails (maybe related to viewtopic.php?f=1&t=275&start=0)

Executing standalone wyUpdate works ok, but i need to integrate the update process in my dll with AutomaticUpdater.

Regards,Jose Garcia

Hi Jose,

Checking for updates is fine, but when you select to install the update, the control closes the exe application but next time the application is launched the update process seem no being executed (Not sure how is managed this in AutomaticUpdater). Is not possible to use AutomaticUpdater in this context?

Can you tell me how you're adding the AutomaticUpdater to the app? Are you adding it to the constructor of the app's main form?

Also after restart the application, when trying to check again for new versions the process fails (maybe related to viewtopic.php?f=1&t=275&start=0)

Can you tell me the type of failure? Is it an error (if so, what does it say), or does it say you already have the latest version?

Thanks for response

The control is added in the main form of the DLL plugin, similar as shown in the video tutorial provided.

When you click to check updates the control informs about a new version, and if you select Install Now option, the application is closed correctly.

Next time the application is started no seems the update has being installed as the changes to the application are not avalaible. I understand that the update process to replace the application files is executed before the application is started again?

When select to check for updates the error shown is: "wyUpdate ended before the current update step could be completed". Is possible to get more detailed logs?

When you click to check updates the control informs about a new version, and if you select Install Now option, the application is closed correctly.

Next time the application is started no seems the update has being installed as the changes to the application are not avalaible. I understand that the update process to replace the application files is executed before the application is started again?

When you explicitly click the "Install now" menu, you force the AutomaticUpdater to close and wyUpdate should start. Are you seeing wyUpdate showing itself after you clicked "Install now"? Or is this when the error is shown?

When select to check for updates the error shown is: "wyUpdate ended before the current update step could be completed". Is possible to get more detailed logs?

This can happen for a number of reasons. Unfortuantely there's no good way to log this because the error isn't rasied by wyUpdate, it's raised because of wyUpdate. Namely it quit or crashed instead of doing what the AutomaticUpdater expected it to do.

Try running wyUpdate.exe by itself. Close your app, and just double click wyUpdate.exe. Does it update your app?

About .... When you explicitly click the "Install now" menu, you force the AutomaticUpdater to close and wyUpdate should start. Are you seeing wyUpdate showing itself after you clicked "Install now"? Or is this when the error is shown?

When click in Install now, the whole application is closed, but wyUpdate is not shown.

The COM dll is not in same folder as EXE that uses it, for this reason I set wyUpdateLocation in the AutomaticControl (seems ok as the checking for new versions work), but can this be the reason that seems not executed when is closed the application?

About .... This can happen for a number of reasons. Unfortuantely there's no good way to log this because the error isn't rasied by wyUpdate, it's raised because of wyUpdate. Namely it quit or crashed instead of doing what the AutomaticUpdater expected it to do. Try running wyUpdate.exe by itself. Close your app, and just double click wyUpdate.exe. Does it update your app?

Running wyUpdate standalone works ok, the problem is when using the AutomaticUpdater control.

The COM dll is not in same folder as EXE that uses it, for this reason I set wyUpdateLocation in the AutomaticControl (seems ok as the checking for new versions work), but can this be the reason that seems not executed when is closed the application?

Are you updating the exe (and associated files) or just your COM dll? Where is your dll with respect to the host program (subfolder or somewhere else)?

You said you're adding the AuomaticUpdater to your own form that's part of the COM dll, but does the host exe have a main form of its own?

Are you in control of the host exe, or is it a 3rd party executable?

Hi

The dll is installed in it's own folder inside "program files" folder, different from folder of EXE host. Apart of the dll additional files, like some xml stuff used by the dll, are installed also, but no EXE is installed (the EXE host where the COM dll is used is a third party application).

The COM dll registers some toolbars and commands in the EXE host, so can be invoked from the EXE host. Also the COM dll contains some forms, in one of this forms that acts as main form for the plugin I added the AutomaticUpdater control. As I comented, works ok to check for updates, but wyUpdate is not executed after selecting to install the updates.

I saw in the documentation that the control and wyUpdate communicates throught pipes. Is there any documentation on the messages that they exchange? or a possiblility to post a small client example to show how to communicate with wyUpdate to check for updates and install them. This can be nice to use a simple updater functionality inside the COM dll in case can't get working AutomaticUpdater.

Cheers,

Ok, I see. The problem is that when you click "Install Now" wyUpdate is waiting for your app to close completely. I bet if you check the process manager you'll see wyUpdate.exe is still idling - waiting for your app to close. Is it possible your app isn't closing completely? Something is still in memory.

Also, if wyUpdate.exe was still running then this would explain the "wyUpdate ended before the current update step could be completed" problem when you try to check for updates later. wyUpdate is a single instance app, so it will see the other instance of wyUpdate running, and bail out before it has a chance to talk to your AutomaticUpdater instance.

I saw in the documentation that the control and wyUpdate communicates throught pipes. Is there any documentation on the messages that they exchange? or a possiblility to post a small client example to show how to communicate with wyUpdate to check for updates and install them. This can be nice to use a simple updater functionality inside the COM dll in case can't get working AutomaticUpdater.

We plan on open sourcing the entire automatic updater control. We've pushed this priority up to v2.6 of wyBuild. But we don't have a simple example that shows the communication.

In the meantime, you can use silent update checking. It's not as sexy as the automatic updater functionality, but it's a good stop-gap until we open source the AutomaticUpdater.

I checked in the Process Manager:

When checking for an update, then wyUpdate is executed and keeps in memory.

I closed the host EXE application and both EXE process and wyUpdate finishes inmediatelly, not showing any screen.

Next time is started the EXE application and trying to check for updates, wyUpdate doesn't appears in the Process Manager (maybe it appears but crashes inmediatelly).

I'll try with the silent update for now.

Cheers

I checked in the Process Manager:

When checking for an update, then wyUpdate is executed and keeps in memory.

I closed the host EXE application and both EXE process and wyUpdate finishes inmediatelly, not showing any screen.

Next time is started the EXE application and trying to check for updates, wyUpdate doesn't appears in the Process Manager (maybe it appears but crashes inmediatelly).

I'll try with the silent update for now.

Cheers

Did you managed this problem? I've got something similar.

First time I run my app, it (AutomaticUpdater) checks for an update, then when I choose "Install update" my app closes and wyUpdate process is started but it is closed immediately. Why is that? If I start wyUpdate manually it finds and installs update. Then when I start my app, AutomaticUpdater tells that it is up to date and everything is ok.

Best regardsshmayek

We can't reproduce this problem.

Can you reproduce this on a smaller scale? That is, can you make an example project that reproduces this behavior. If not, can you send us your full project as is to support@wyday.com . We'll check out what's wrong.

I can't send you a full project, but I'll try to reproduce this in small one and then I'll send you this.

Best regardsshmayek

I found the solution. This was a little bit tricky, but the authorization form where AutomaticUpdater is wasn't run by Application.Run() method (it was before showing main form). Now it works nice 🙂

Best regardsshmayek