The backslash in a JavaScript string is a special charater indicating that the next character (or group) is a special character.
For example, in a webpage script:
window.alert( "Gimme a newline!\nThere you go!" );
Will output a message box with two lines, because the '\n' sequence starts a new line, specifically sending the CR+LF combo in Windows.
Another example, for WScript:
WScript.Echo( "Tabs\tare\tus." );
will output an echobox (or console output) the three words with tabs between.
The way to include a backslash is to put two of them in the character string:
// from an hta script...
var wsShell = ActiveXObject("WScript.Shell"); // yes, you can access the shell from an hta, but be careful!
var str = "HKCU\Software\Microsoft\Internet Explorer\PageSetup\margin_top";
var str2 = "HKCU\\Software\\Microsoft\\Internet Explorer\\PageSetup\\margin_top";
alert( wsShell.RegRead( str ) ); // This won't work
alert( wsShell.RegRead( str2 ) );
// and just for fun...
alert( str + "\n" + str2 );