Solution:
You need to put the command in double quotes ".
If a directory has white spaces in, put quotes around it. This includes the program you're calling, not just the arguments.
example:
dir "C:\Program Files\7-Zip" ( correct )
dir C:\"Program Files"\7-Zip ( not correct )