<p>Just that... I get a string which contains a path to a file plus some arguments. How can I recognize the path? I thought about the index of the '.' in the file... but I don't like it.<br>
What about using regular expressions? Can anyone point me in the right direction?</p>

<p>Regards</p>

<p>Edit: Theses are valid entries...<br>
somefile.msi /a<br>
C:\MyFolder\SomeFile.exe -i -d</p>

<p>I don't care much about the arguments cause once I have the path I'll assume the rest are arguments</p>

Well, before you tackle finding the path in the string, you need to outline a set of rules for what a path in this context
This is, for the operating system, a valid filename: a
Since no directory information is specified, the
current directory
will be used. The file has no extension.
But is still a filename.
Is this a
path
in your context? Or do you mean something that has directory information as well?
Examples of what you need to handle would be useful.