Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use without installer? #142

Open
Sledro opened this issue Jul 8, 2017 · 5 comments
Open

Use without installer? #142

Sledro opened this issue Jul 8, 2017 · 5 comments

Comments

@Sledro
Copy link

Sledro commented Jul 8, 2017

Is there a way to use this to simply replace a portable exe without an installer?

@vslavik
Copy link
Owner

vslavik commented Jul 8, 2017

Not currently. PRs welcome.

Repository owner locked and limited conversation to collaborators Aug 17, 2017
Repository owner deleted a comment from solusipse Aug 17, 2017
Repository owner deleted a comment from solusipse Aug 17, 2017
Repository owner deleted a comment from solusipse Aug 17, 2017
Repository owner deleted a comment from solusipse Aug 17, 2017
@vslavik
Copy link
Owner

vslavik commented Aug 17, 2017

[Deleted a series of factually wrong and increasingly off-topic comments.]

Repository owner unlocked this conversation Aug 20, 2017
@bvgastel

This comment has been minimized.

@codygray
Copy link

It would be relatively straightforward to do this on Windows. The key is that, while you cannot delete a running executable, you can easily rename it.

So, once an update is initiated, the workflow would be:

  • Have WinSparkle rename the currently-running EXE by appending ".bak" to its name (or whatever).
  • Have WinSparkle download the new (updated) EXE, storing it in the same folder as the currently-running EXE with the original name of the currently-running EXE (i.e., without the ".bak" suffix).

The currently-running application won't be updated live---the user will need to close the application and re-open it. (WinSparkle could theoretically force the application to close after it completed downloading the new EXE, but this seems needlessly invasive.) But when the user does go to re-open the application, because the updated EXE has been put in the place of the original EXE, the process will be seamless to them.

For completeness, code should be added to WinSparkle that checks for any ".bak" files in the application folder and removes them. These are vestiges of the previous update process, and should no longer be required. (Bonus: A copy of the old application binary is kept until the updated application binary successfully starts up.)

cc @bvgastel , in case you're still interested in implementing this feature. Armed with this information, you should not need any particular Windows-programming expertise. All you need to know how to do is how to rename and delete files.

@vslavik
Copy link
Owner

vslavik commented May 29, 2021

The key is that, while you cannot delete a running executable, you can easily rename it.

Yep, that's crucial. Assuming the same applies to DLLs and WinSparkle.dll can be renamed while loaded, then in-place patching is relatively straightforward too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants