Getting a File Name from a File Launch String
I am reading in the value data from a registry value in HKLM/Software/Microsoft/Windows/CurrentVersion/Run. I am trying to determine the path to file that is being launched from the value. To do, so I need to be able to parse out the parts of the value data that are not part of the file path (any command line parameters specified, quotation marks, etc).
Is there any API value that will parse it for me like Windows does?
If there is not, is it documented somewhere how Windows parses those strings? If I create my own function to do so, I want it to work exactly like Windows does when it parses it.
Thank you for any help you can provide.