Unfortunately, this question is hard to understand. So, sorry if I'm answering a wrong question; please don't blame me too much for that.
It seems to me that your problem is running a child process from your application, such as you would do by the command line like
net use z: %source%
is some parameter. I also think that you are talking about .NET application — please see my comment to the question.
If this is the problem, the solution is this: you need to use the class
, please see:
If you have a batch file with a parameter (should be represented as
in the code of a batch file), the first parameter of
should be a name of the batch file, and second parameter — the parameter(s) of the batch file.
Also, you may need to redirect the output of the child process to a stream to use the output in your host program. For this purpose, you need to use the properties
(just in case there are errors
). You can find a code sample for redirection here: