there are many parameters in this link , maybe one can solve your problem?

http://www.allapi.net/apilist/ShellExecute.shtml