something strange with new process Arguments



Hi,

I'm starting a new process and passing it some arguments to look at a
folder that I have created. The folder gets created correctly. The
arguments are read from an xml file saved with ansi encoding (the xml
file works fine so that is not the problem), but with certain strings
that I expand via a regex replace, so that for example if I have the
following arguments:

<command>"%%FileName%" /O="%%OutputFilesFolder%"</command>

this gets read into a variable unexpandedcommand
and I run

foreach (KeyValuePair<string, string> kvp in SettingsDictionary)
{
Replacementkey = "%%" + kvp.Key + "%";

Unexpandedcommand =
Regex.Replace(Unexpandedcommand, Replacementkey, kvp.Value);

}

where the command %%FileName% gets replaced by the value of FileName
in my Dictionary and so forth.

The expanded result gets passed as an argument to the application, and
I also write it to the event log:

"C:\Copy of test2.doc" /O="C:\Copy of test2_files"

Now the problem is when I pass this argument via StartInfo.Arguments I
get nothing out of the process, it just exits. No error from the
process either. But when I start the command line and call the process
with these arguments that I put in my event log it works fine.

I figure it has to be an encoding problem somewhere among the various
possible encodings and passings of strings going on. But I am stumped
as to which one it could be.

So uh, the phrase I'm looking for is: HELP!!!!


.



Relevant Pages

  • Re: comparing binary strings
    ... The only time the encoding of the strings is ... important is when you're passing them to external code as a C-style char* ...
    (comp.lang.perl.misc)
  • Re: comparing binary strings
    ... The only time the encoding of the strings is ... important is when you're passing them to external code as a C-style ...
    (comp.lang.perl.misc)
  • Re: automating the SQL warning and the choice of text format
    ... In order to get the correct encoding, I believe that you have to do the ... use a .odc file to connect to the data ... You need one of those for each data source. ... folder to the same folder as the .odc and try to open the .odc in Internet ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Paths help
    ... Now in my cgi-bin folder I have a folder called test ... the script would behave as you expect it to behave. ... The backslash is a special character in Perl's double-quoted strings: ... The / is not a special character in Perl's strings (Note that some OSes do ...
    (comp.lang.perl.misc)
  • Re: Failure of long address lines in IE 6 to load
    ... I found the folder ETC and in it several file folders. ... |> anti-spyware application or your own use of a custom HOSTS file, James. ... |>>> I suspect IE is not set to handle long strings. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)