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.
What about using regular expressions? Can anyone point me in the right direction?
Regards
Edit: Theses are valid entries…
somefile.msi /a
C:\MyFolder\SomeFile.exe -i -d
I don’t care much about the arguments cause once I have the path I’ll assume the rest are arguments
For non-MSI programs, UninstallString is passed to CreateProcess, so you probably want to replicate its method of determining the filename. Read http://msdn.microsoft.com/en-us/library/ms682425.aspx, especially the notes for lpApplicationName and the second half of lpCommandLine.
Programs installed by MSI have a separate system (msi!MsiConfigureProduct or msi!MsiRemovePatches).