In the previous installment, it was noted that the last variable in the AHK Run command, OutputVarPID, is important in a multi-user, multi-tasking environment. Here’s an example:
Application software originally written for stand-alone PC operation then later adapted for Windows Server 2008 / 2012 may develop some quirks such as partial failure to “clean up” after itself upon exit.
Subsequent attempts to initialize the same application may yield an error: “Application already open”. No problem – just delete the process and re-call the app. No problem unless multiple users are also using the app. Which process do you kill?
Maintaining a log indexed by user and cross-referencing the unique “OutputVarPID” allows for an easy means of killing only the correct process without disturbing any others. This utility could even be incorporated into the app initialization process potentially making it transparent to the user.