Unique Process ID

by [Published on 19 April 2016 / Last Updated on 19 April 2016]

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.

See Also

Review and Comments

The Author — Lauren Malhoit

Lauren Malhoit avatar

Lauren Malhoit has been in the IT field for over 10 years and has acquired several data center certifications. She has been writing for a few years for several different websites.

Latest Contributions