Split() is your friend but if you need to parse off args as well, it could get complicated. You may have to double-split and join to get what you're after.
The command can be split on the hacks '\' since they cannot exist in a folder or file name, but the args could be more challenging. The prob is that args are usually separated by spaces and spaces are valid characters in folder and file names. Sometimes args may be prefaced by hyphens '-' and whacks '/' or contain equals '=' somewhere in the middle.
How is it that you may have a string in KiX that includes path, command, and args and not know where one starts and the other ends? If you explained exactly what you are trying to do, there may be some better ideas.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.