Show/Hide Toolbars

EmEditor Help

Navigation: EmEditor Help > Macro Reference > Tutorial

EmEditor Macro Reference: Manipulate the Registry

Scroll Prev Top Next More
EmEditor Home - EmEditor Help - EmEditor Macro Reference - Tutorial

Manipulate the Registry

To manipulate the registry, use the RegRead Method, RegWrite Method, and RegDelete Method of WshShell Object.

The following example code reads the file name of a running macro from the registry, and displays it.


WshShell = new ActiveXObject( "WScript.Shell" );

str = WshShell.RegRead( "HKCU\\Software\\EmSoft\\EmEditor v3\\Common\\MacroFile" );

alert( str );


Set WshShell = CreateObject( "WScript.Shell" )

str = WshShell.RegRead( "HKCU\Software\EmSoft\EmEditor v3\Common\MacroFile" )

alert str


In JavaScript, if you want to include a backslash "\" within a string, it must be preceded by another backslash "\\".


g Microsoft MSDN Library: RegRead Method

Copyright © 2003-2021 by Emurasoft, Inc.