rcaelers/workrave — pull request #21 by jay (2012-06-11 06:23:28+00:00)
Title: Active Setup emulator and ChangeAutorun utility

I have a client (same one from last month) who needed more control over the autorun settings. For example automatically starting Workrave for a user that is created after Workrave is installed. Currently the installer is only changing the Workrave autorun settings for the administrator user that's installing it.

I wrote a custom install script where I have it using Microsoft's undocumented Active Setup so that a non-interactive post-install configuration program which can change autorun settings for each user is run the next time that user logs in. What I have now looks like this:
96dpi: http://cloud.github.com/downloads/jay/workrave/Autorun.png
120dpi: http://cloud.github.com/downloads/jay/workrave/Autorun_120dpi.png

I think this could be a feature worth having in the trunk. I do not have submissions for changes to the Workrave installer. I have the custom installer script which I will upload later this month, along with everything else on the branch which will go GPL.

What is up for submission here is an emulator which emulates the behavior of Active Setup. For example if Workrave was just installed and a user runs Workrave before logging out and then back in then any post-install program should be run before Workrave loads. The emulator emulates the behavior of Active Setup to run the program. Also the ChangeAutorun program which is the non-interactive program invoked by Active Setup to change the settings.

This is supporting code mostly. It does not enable Active Setup, it only adds support for it if it is enabled by an installer script.