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

_______________________________________________
Mozilla-xpinstall mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpinstall

Reply via email to