Self updating binary

Hi there, Has anyone experience suggestions with writing self updating binaries for windows ? I have a small utility that I have to install on two "unmanaged" pc's, I would like to let the program check an url, for new versions, download a new versions, some how check that the program is valid (with a build in key, or certificate) and replace itself when necessary. Has anyone already done this in Haskell? Any suggestions, links ? Thanks, Pieter -- Pieter Laeremans pieter@laeremans.org

Hi Pieter
Not recently, but back when I tried this for keera-posture, I had
difficulties with one binary substituting itself *on windows*. If the file
was being executed, I could not erase it.
(keera-posture did check a URL for new versions.)
You can download a setup program that you can run without user
intervention, closing your main program while it updates. Some installation
building systems support unattended updates/installations.
Otherwise, what you can do is to *rename* the current executable, store the
new one in place of the old one, and erase old executables every time you
start the app. Yes, it's a hack.
It would be great if we could have automatic updates of programs from
remote archives using the package manager like on linux :(
Ivan
On 15 February 2017 at 14:36, Pieter Laeremans
Hi there,
Has anyone experience suggestions with writing self updating binaries for windows ? I have a small utility that I have to install on two "unmanaged" pc's, I would like to let the program check an url, for new versions, download a new versions, some how check that the program is valid (with a build in key, or certificate) and replace itself when necessary.
Has anyone already done this in Haskell? Any suggestions, links ?
Thanks,
Pieter -- Pieter Laeremans pieter@laeremans.org _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

We implemented that trick for Windows in Stack, which you can see at:
https://github.com/commercialhaskell/stack/blob/c3e05b3b4c3649aa6c182eaf6611...
On Thu, Feb 16, 2017 at 3:31 PM, Ivan Perez
Hi Pieter
Not recently, but back when I tried this for keera-posture, I had difficulties with one binary substituting itself *on windows*. If the file was being executed, I could not erase it.
(keera-posture did check a URL for new versions.)
You can download a setup program that you can run without user intervention, closing your main program while it updates. Some installation building systems support unattended updates/installations.
Otherwise, what you can do is to *rename* the current executable, store the new one in place of the old one, and erase old executables every time you start the app. Yes, it's a hack.
It would be great if we could have automatic updates of programs from remote archives using the package manager like on linux :(
Ivan
On 15 February 2017 at 14:36, Pieter Laeremans
wrote: Hi there,
Has anyone experience suggestions with writing self updating binaries for windows ? I have a small utility that I have to install on two "unmanaged" pc's, I would like to let the program check an url, for new versions, download a new versions, some how check that the program is valid (with a build in key, or certificate) and replace itself when necessary.
Has anyone already done this in Haskell? Any suggestions, links ?
Thanks,
Pieter -- Pieter Laeremans pieter@laeremans.org _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (3)
-
Ivan Perez
-
Michael Snoyman
-
Pieter Laeremans