winreg.setRootKey is not a function
"Iceman" <[email protected]> 18 Jan 2005 00:14:33 -0800
| Newsgroups | gmane.comp.mozilla.devel.xpinstall |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
i am trying this snippet in install.js
i am consistently getting the error
"winreg.setRootKey is not a function"
var winreg = getWinRegistry();
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
var index = 0;
var baseKey = "Software\\Mozilla";
while ( (MozillaVersion = winreg.enumKeys(baseKey,index)) != null )
{
logComment("MozillaVersion = " + MozillaVersion);
subkey = baseKey + "\\" + MozillaVersion + "\\Extensions";
pluginsDir = winreg.getValueString ( subkey, "Plugins" );
if ( pluginsDir )
logComment("pluginsDir = " + pluginsDir);
else
logComment("No plugins dir for " + baseKey + "\\" + MozillaVersion);
index++;
}
Here is the install.log
-------------------------------------------------------------------------------
file:///C:/Documents%20and%20Settings//Desktop/t.xpi -- 2005-01-17
23:36:36
-------------------------------------------------------------------------------
** Line: 0 can't convert Error to string
** Line: 1 winreg.setRootKey is not a function
Install **FAILED** with error -229 -- 2005-01-17 23:36:38