|actually, that's a pretty good question, imo. One way would be to read the registry "associations", which i don't know what the key is offhand. There's probably a better way than that, maybe using tasklist, but not sure. To end a gui program is not so simple, you would, again, have to use tasklist (search for the associated program, making sure it's the correct instance in case it's running more than one instance), then use taskkill to stop it. I guess taskkill is "smart" enough to terminate all the child processes and dlls etc.|
-- edit oops: my response crossed in the mail, looks like you already figured out as much or more than i can tell you.