If the path variable contained values with an ampersand character (such as in the case of MySQL), the string splits by this character, and tries to execute what follows as a separate command.
All occurrences of the set command containing %PATH% should be wrapped in quotation marks