C# Programming
05-05-2009, 01:01 PM
Hi, I am trying to start an application from my application, which opens a default file, given it's arguments as follow:
Process prc = new Process();
prc.StartInfo.FileName = "azman.msc";
prc.StartInfo.Arguments = "msxml://" + Environment.CurrentDirectory + "\\AuthorizationStore.xml"; // CurrentDirectory = C:\Users\Hugo\Documents\Visual Studio 2008\Projects\AzManTest\AzManTest\bin
prc.Start();
Note the current curectory is:
CurrentDirectory = C:\Users\Hugo\Documents\Visual Studio 2008\Projects\AzManTest\AzManTest\bin
Which contains spaces. For some or other odd reason, it does not like this ...
If this directory is in such a ******** that there are no spaces in the Directory name, then this works fine...
Can I replace the spaces of the directory with something ? How can I fix this problem.
Any help would be much appreciated!
Process prc = new Process();
prc.StartInfo.FileName = "azman.msc";
prc.StartInfo.Arguments = "msxml://" + Environment.CurrentDirectory + "\\AuthorizationStore.xml"; // CurrentDirectory = C:\Users\Hugo\Documents\Visual Studio 2008\Projects\AzManTest\AzManTest\bin
prc.Start();
Note the current curectory is:
CurrentDirectory = C:\Users\Hugo\Documents\Visual Studio 2008\Projects\AzManTest\AzManTest\bin
Which contains spaces. For some or other odd reason, it does not like this ...
If this directory is in such a ******** that there are no spaces in the Directory name, then this works fine...
Can I replace the spaces of the directory with something ? How can I fix this problem.
Any help would be much appreciated!