Hi all,
i have declared a string below which will be a switch to a command.
string prnportpatha=@"\\servername\apps\Utilities\AddPrinter\prnport.vbs";
how do i call the variable in a command as per below
proc.StartInfo.FileName=("cmd.exe");
proc.StartInfo.Arguments=("/k cscript " + prnportpatha);
this doesnt seem to work, i get the error:
the name prnportpatha does not exist inthe current context.
Calling a string variable in "proc.StartInfo.Arguments" Pin
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Amit GuptaRank #190 · 12.8K reputationPosted May 29, 2017, 2:17 AM EDT