Zend certified PHP/Magento developer

Precise syntax of the PATH variable in Windows

I’m currently writing a shell-like application which should be able to execute commands from the directories listed in the PATH variable. It looked like these directories are just separated by semicolon characters, until I tried my code on a friend’s machine, where the PATH contained quotation marks or escape sequences (which seems really unnecessary as semicolons cannot appear in directory names and should completely suffice as separators).

The official documentation on cmd or path only mentions the PATH variable in passing, and does not specify the allowed syntax. Is there specification that I can refer to for getting my PATH parsing right and avoiding nasty surprises like that in the future?