S
Sam Marrocco
I'm using a ProcessStartInfo object to provide command line information
to a process for execution as follows:
Dim PSI as new ProcessStartInfo
PSI.Filename MyApp.exe
PSI.Arguments -blah -blah
Dim MyProcess as new Process
MyProcess.StartInfo=PSI
MyProcess.Start
It appears that the entire command line "MyApp.exe -blah -blah" cannot
be given to the .Filename property of the ProcessStartInfo class--that
is, it *must* be broken up into Filename and Arguments properties.
However, my code is provided the command line in the form of a single
string i.e. "MyApp.exe -blah -blah". I considered writing a small parser
to break the line into it's elements, based upon first space found, but
I'm worried about things like spaces in filenames, etc. if filenames are
provided in quotes.
Is there a .net command to break a command line into it constituent
Filename & Argument elements reliably?
--
==================================================================
Sam J. Marrocco
Sr. Visual Effects Artist/R&D
Travelling Pictures/GTN
Inferno, Flame, Maya, All that cool stuff!
"The fact that no one understands you doesn't make you an artist."
==================================================================
to a process for execution as follows:
Dim PSI as new ProcessStartInfo
PSI.Filename MyApp.exe
PSI.Arguments -blah -blah
Dim MyProcess as new Process
MyProcess.StartInfo=PSI
MyProcess.Start
It appears that the entire command line "MyApp.exe -blah -blah" cannot
be given to the .Filename property of the ProcessStartInfo class--that
is, it *must* be broken up into Filename and Arguments properties.
However, my code is provided the command line in the form of a single
string i.e. "MyApp.exe -blah -blah". I considered writing a small parser
to break the line into it's elements, based upon first space found, but
I'm worried about things like spaces in filenames, etc. if filenames are
provided in quotes.
Is there a .net command to break a command line into it constituent
Filename & Argument elements reliably?
--
==================================================================
Sam J. Marrocco
Sr. Visual Effects Artist/R&D
Travelling Pictures/GTN
Inferno, Flame, Maya, All that cool stuff!
"The fact that no one understands you doesn't make you an artist."
==================================================================