Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
C:\Program Files (x86)\DotR\DotR.exe

I know I need to escape the backslashes like C:\\Program Files (x86)\\DotR\\DotR.exe but it still doesn't work. Do I need to handle spaces and parens as special characters and if so, how?

Edit with details: I'm running a small console application from the context menu. When I save it to C:\DotR.exe and add to HKEY_CLASSES_ROOT\Folder\shell\DotR\ the value C:\\DotR.exe %1 it works fine but when I try to make it C:\\Program Files(x86)\\DotR\\DotR.exe %1 I get an error message that says application not found. I want to save it in program files and not C root.

share|improve this question
up vote 8 down vote accepted

How exactly are you trying to add it?

I suspect your primary problem is that you need quotes around the name.

"C:\Program Files (x86)\DotR\DotR.exe" %1

If you are adding the value by using the regedit.exe GUI editor, as a string value, then you do not need to escape the \ or the " characters. The GUI will handle the escaping, you just need to add the quotes.

If you are adding it with a .reg file then it \ characters do need to be escaped, you also need to escape the " character. So a REG_SZ value of "c:\asdf\asdf" would look like this.

share|improve this answer
I was using regedit. The quotes worked, thanks. – pdizz Sep 24 '12 at 20:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.