Hello, I'm working with a friend on an installer program for one of our other programs. The installer is supposed to be able to ask the user to update the installer, and if they say yes, the installer will overwrite itself with its latest version from GitHub, then run itself once complete. The way we did this in previous programs was as follows:
os.execute("cd /home; pastebin get -f hh14Sxhi dc15; cls; dc15")
In the above code, the example program cd's to its install directory, overwrites itself using the pastebin command, then runs itself. However, that is not having the intended effect in the installer, which ends up skipping past the update prompt when re-running itself. Is there a better way to implement this?(edited)
The only thing I can think of would be to create a new thread that runs the new process, then kill the overwritten process without joining the newly-created thread, but I'm not entirely sure.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
os.execute("cd /home; pastebin get -f hh14Sxhi dc15; cls; dc15")Link to post
Share on other sites