an idea would be to write a variable into the registry, and set it to 1, 2..3..etc just the count of how many times a program is opened at the same time, and lower the value if one of the programs closes.
Now you can readout the registry, and ask if this value is 1 or higher.
executing other porgrams, calling a webpage or documents.. are done by using exec