paulsidebottom
asked on
Launching Process
Hi,
I would like to launch a process from within my application, at present I am using the System.Diagnostics.Process class to launch the process. In addition, I am passing in any command line arguments using the second parameter of the start method, e.g. :
System.Diagnostics.Process .Start(oTa sk.Command , oTask.Arguments);
This works fine for most things. However it doesnt seem to work when the target is specified in the same format as the target field within a Windows Shortcut, for example if the target path of the shortcut is:
Comms.exe WaitForExit=0
I pass this as:
System.Diagnostics.Process .Start("Co mms.exe"," WaitForExi t=0");
Any ideas?
Thanks
I would like to launch a process from within my application, at present I am using the System.Diagnostics.Process
System.Diagnostics.Process
This works fine for most things. However it doesnt seem to work when the target is specified in the same format as the target field within a Windows Shortcut, for example if the target path of the shortcut is:
Comms.exe WaitForExit=0
I pass this as:
System.Diagnostics.Process
Any ideas?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the replies but as stated, I am already using the arguments property to pass command arguments. It seems the problem may not originate from the use the of command arguments more the process equivalent of Windows "start in" property.
Does anyone know how the start in property can be specified for a process?
Thanks.
Does anyone know how the start in property can be specified for a process?
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Apologies, I forgot I posted this - yes I'm happy with the resolution. Thanks for your answers.
http://www.codeproject.com/csharp/HowToLaunchProcess.asp
dZ..,