Skip navigation

JSI Tip 6671. How do I include a quote mark (") in the data when using REG.EXE?


When using REG.EXE (built into Windows XP and Windows Server 2003, or from the Windows 2000 Support Tools) to add or modify a registry data value, you must use the escape character (\) when your data is encapsulated in quote marks.

Example

To set a data value equal to
     "%UserProfile%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data" "%1"
the text after the /d switch should be:
 "\"^%UserProfile^%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\" \"%1\""



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish