<div dir="ltr"><div>We implemented that trick for Windows in Stack, which you can see at:</div><div><br></div><div><a href="https://github.com/commercialhaskell/stack/blob/c3e05b3b4c3649aa6c182eaf661102e170d459a9/src/Stack/Setup.hs#L1749">https://github.com/commercialhaskell/stack/blob/c3e05b3b4c3649aa6c182eaf661102e170d459a9/src/Stack/Setup.hs#L1749</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 16, 2017 at 3:31 PM, Ivan Perez <span dir="ltr"><<a href="mailto:ivanperezdominguez@gmail.com" target="_blank">ivanperezdominguez@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Pieter<br><br>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.<br><br>(keera-posture did check a URL for new versions.)<br><br>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.<br><br>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.<br><br>It would be great if we could have automatic updates of programs from remote archives using the package manager like on linux :(<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div></div><div><div>Ivan<br></div></div></font></span><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 15 February 2017 at 14:36, Pieter Laeremans <span dir="ltr"><<a href="mailto:pieter@laeremans.org" target="_blank">pieter@laeremans.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi there,<br>
<br>
Has anyone experience suggestions with writing self updating binaries<br>
for windows ?<br>
I have a small utility that I have to install on two "unmanaged" pc's,<br>
I would like to let the program check an url, for new versions, download<br>
a new versions,<br>
some how check that the program is valid (with a build in key, or<br>
certificate) and replace itself when necessary.<br>
<br>
Has anyone already done this in Haskell? Any suggestions, links ?<br>
<br>
Thanks,<br>
<br>
Pieter<br>
<span class="m_-8609546434750015589m_1503751920032814391HOEnZb"><font color="#888888">--<br>
  Pieter Laeremans<br>
  <a href="mailto:pieter@laeremans.org" target="_blank">pieter@laeremans.org</a><br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/haskell-caf<wbr>e</a><br>
Only members subscribed via the mailman list are allowed to post.</font></span></blockquote></div><br></div></div></div></div>
<br>______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.<br></blockquote></div><br></div>