Automating JoplinPortable Update

JoplinPortableMonitor.exe:

  • is a single AutoIt3 script file encoded into an executable
  • should be placed next to JoplinPortable.exe
  • to differentiate its icon from Joplin have coloured the ‘J’ red
  • run instead of JoplinPortable.exe to do the following:
  1. If JoplinPortable.exe exists in the Download folder it version-names it so as not to interfere with a subsequent download.
  2. If JolplinPortable is already running it asks if you want to stop it and start another instance.
    (I have a second JoplinPortable & profile in a VeraCrypt volume with all my confidential stuff which musn’t be synced)
    • if yes it stops and starts JoplinPortable.exe
  3. Looks every second to see if the update window has appeared
    • if it has it looks every second to see if JoplinPortable.exe has arrived in the Download folder
  4. If it has it asks if you want to stop Joplin and do the update
    • if yes Joplin is stopped, the old version is version-named, and the downloaded file is placed next to JoplinPortableMonitor (or in \app\Joplin for the PortableApps Dev Test version), and Joplin is restarted
  5. Finally it sits monitoring for JoplinPortable to be stopped
    • deleting temporary files in AppData\Roaming\Joplin before closing

Ediit: It writes all actions to JoplinPortableMonitor.log

NB. Before a portable program is run it should ensure that any drive letters present are changed to the current one. Sadly I don’t know how to change the external editor’s drive letter in the SQLite database.

Download from https://www.dropbox.com/sh/8gxjyg35ii428bv/AACWlYZQGbsNYN5DgrdN-FSla?dl=0

JoplinPortableMonitor.au3 - the source script
JoplinPortableMonitor.html - the script listed in colour
JoplinPortableMonitor.exe v1.0.1.44
MD5 Hash: 63E27CDCFC72098A3357E831F47A79FC

Would have liked to edit original post but couldn’t find a button

2020-04-22 Update:

  • The download folder can now be specified by an entry in an INI file JoplinPortableMonitor.ini or as a comand line paremeter
  • Improved MsgBox and dialog box window handling

JoplinPortableMonitor.exe v1.0.2.4
MD5 Hash: B318F28070BB13EC81E9E662E8840ECB

2020-11-10 Update:

  • Fix for change in Joplin's Update dialog - [&Yes] button was changed to [Download] so breaking this app
  • improved logic if cancel updating to new version
  • more log messaging
  • improved build process

JoplinPortableMonitor.exe v1.0.3.3
MD5 Hash: 921ED55F9ACEB66CDD79A9D13E4D3495