I have the absolute path of internet explorer executable and the absolute path of an xml file, and i want to open that xml using IE. The code i wrote works fine if there aren't any instance of IE already opened. If there is an IE instance opened, IE will be launched and will convert the filesystem path in something like an URL.
First instance of IE open this path: (and works fine) C:\workingfolder\preparazioni\DichiarativiDP\RESPONSABILE CONSERVAZIONE\IPdV.xml
Next instance of IE open this path: (and fails)
http://%22c/workingfolder/preparazioni/DichiarativiDP/RESPONSABILE%20CONSERVAZIONE/IPdV.xml%22
This is my code:
Process proc = new Process();
proc.StartInfo.UseShellExecute = true;
//IE executable absolute path
proc.StartInfo.FileName = sApplication;
//Xml file absolute path
proc.StartInfo.Arguments = "\"" + file + "\" " + sAdditionalArguments;
proc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
proc.Start();
I tried the same code calling Chrome browser and it works fine, opening a new tab every time.