Hi I have an application which i need to execute from another exe. The same json string works fine when i pass as command line arguments; but fails when i pass it as Process Start Info Arguments.
command line arguments:
Input (i.e. args[0]): "{\"mydllpath\":\"D:\\dll\",\"FilePath\":\"D:\\Input\\abc.doc\", \"Attribute\":\"word\"}"
Console.Writeline: {"mydllpath":"D:\\dll","FilePath":"D:\\Input\\abc.doc", "Attribute":"word"}
Success parsing
Process Start Info Arguments:
Input: "{\"mydllpath\":\"D:\\dll\",\"FilePath\":\"D:\\Input\\abc.doc\", \"Attribute\":\"word\"}"
Console.Writeline:{"mydllpath":"D:\dll","FilePath":"D:\Input\abc.doc", "Attribute":"word"}
Failed parsing: Unexpected character encountered while parsing value: D.
ProcessStartInfo psi = new ProcessStartInfo("D:\\ETS\\AE\\bin\\Debug\\AE.exe");
string json = "{\"mydllpath\":\"D:\\dll\",\"FilePath\":\"D:\\Input\\abc.doc\", \"Attribute\":\"word\"}";
psi.Arguments = json;
Process p = new Process();
Debug.WriteLine(psi.FileName + " " + psi.Arguments);
p.Start();
p.StartInfo = psi;