Commit graph

3 commits

Author SHA1 Message Date
Marc Durdin
1897ff14d6 chore(windows): cleanup task deletion issues 2020-12-01 16:45:59 +11:00
Marc Durdin
ae8bb689af chore: improve logging on uninstall 2020-12-01 11:25:38 +11:00
Marc Durdin
a2d6f7d3e8 fix(windows): Task creation and deletion cleanup
Fixes #3994.

Task creation was failing for some users because Windows Tasks are all
stored in a shared folder, so attempts to use the same task name by
different users were failing, especially if the user was a non-admin
user.

Furthermore, attempts to execute the trigger would fail because Windows
treats keyman.exe as needing elevation in this context (even though it
doesn't, actually), and so I changed the trigger to call `kmshell -s`,
which then does the needful.

Finally, the uninstaller now attempts to remove all the scheduled tasks
in the Keyman folder. It doesn't care if it fails -- it's just cleanup
and doesn't impact the system adversely if the tasks hang around.
2020-12-01 09:28:14 +11:00