App restart after update

Richard Gaskin ambassador at fourthworld.com
Tue Jun 17 20:59:28 EDT 2008


Bill Vlahos wrote:
 > Quitting the application after the download is easy but how do I
 > have the computer automatically relaunch it?
 >
 > I would need this for Macintosh and Windows and Linux.

Uninstallers face a similar issue, since they need to delete an app but 
of course an app can't delete itself.

Their approach may work for your circumstance as well:

An uninstaller commonly copies itself to the local temp directory and 
then launches that copy to do the deed.

With Rev 2.9 you can now get the temp folder on all three platforms with:

   get specialFolderPath("temporary")

Temp directories are automatically cleared out by the system 
periodically (often on restart), so while it does mean another copy of 
an app somewhere it's not one that will live for long after it's needed.

-- 
  Richard Gaskin
  Managing Editor, revJournal
  _______________________________________________________
  Rev tips, tutorials and more: http://www.revJournal.com



More information about the use-livecode mailing list