Ok, I just figured it out. I have to double up the slashes and escape characters in the path in the query.
Both the C# compiler and the WMI SQL implementation wants escaped slashes i guess. Stupid computers.
SELECT ProcessId FROM Win32_Process WHERE CommandLine = 'C:\\\\windows\\\\explorer.EXE'