Jayesh Acharya
asked on
System.Diagnostics.Process.Start(strCmdLine); ignore special chars?
strCmdLine = "ifsapf://" + IFS_CMD_STR + IFS_CMD_QRY;
System.Diagnostics.Process .Start(str CmdLine);
process1.Close();
my strCmdLine sometimes contains a # characters, in one example the string was
ifsapf://scott/tiger#1@tes t:customer =1
but what the System.Diagnostics.Process .Start(str CmdLine); does is reinterpret the string and produces
ifsapf://scott/tiger:custo mer=1#1@te st
which for me causes the new applaiciton to fail ...the question i have is how do ignore the # i dont know where in the string it might be, sinces its a users password they can use anything ...
some help would be appreciated ....
System.Diagnostics.Process
process1.Close();
my strCmdLine sometimes contains a # characters, in one example the string was
ifsapf://scott/tiger#1@tes
but what the System.Diagnostics.Process
ifsapf://scott/tiger:custo
which for me causes the new applaiciton to fail ...the question i have is how do ignore the # i dont know where in the string it might be, sinces its a users password they can use anything ...
some help would be appreciated ....
you can wrap them.
http://stackoverflow.com/questions/2210212/process-start-argument-problem-escaping-an-character
http://stackoverflow.com/questions/2210212/process-start-argument-problem-escaping-an-character
strCmdLine = "ifsapf://" + IFS_CMD_STR + IFS_CMD_QRY;
char c = 34;
strCmdLine = c.ToString() + strCmdLine + c.ToString();
System.Diagnostics.Process.Start(strCmdLine);
process1.Close();
ASKER
char c = 34;
is not allowed when i try to compile. i get Constant value 34 cannot be converted to char.
AlsoI can not remove the # or any other special char, as these are used as part of the users password. I need to be able to ignore them ...
is not allowed when i try to compile. i get Constant value 34 cannot be converted to char.
AlsoI can not remove the # or any other special char, as these are used as part of the users password. I need to be able to ignore them ...
ASKER
to use char c = 34;
is the dll that i need to add??
is the dll that i need to add??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
this worked
this will lose the # if that's all you need?