I define multiple instances of mIRC, each with their own working directory by creating a shortcut to (the same) mirc.exe and specifying a command line switch, for example: -r"%appdata%\mIRC1"
I think I can search for the CommandLine property in WMI for the mirc.exe process by using $mircexe and $cmdline to get the WorkingSetSize, but yeah maybe a $pid would work wonders!
Thanks for the WMI example, much appreciated!