You should be writing to HKCU, not HKLM.
----- Original Message ---- From: Brian King <[EMAIL PROTECTED]> To: [email protected] Sent: Friday, April 27, 2007 6:57:56 AM Subject: [Project_owners] nsIWindowsRegKey.writeStringValue failing on Windows Vista This is no doubt due to tightened user access on Vista, but I am even running as a user with Admin rights. Anyone know a workaround? Code: var registry = Components.classes["@mozilla.org/windows-registry-key;1"]. createInstance(Components.interfaces.nsIWindowsRegKey); registry.open(registry.ROOT_KEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", registry.ACCESS_WRITE | registry.ACCESS_READ); registry.writeStringValue("MyApp", '"c:\foo"'); Exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWindowsRegKey.writeStringValue]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://<snipped>/file.js :: functionX :: line 81" data: no] -- Brian King www.mozdev.org - free project hosting for the Mozilla community _______________________________________________ Project_owners mailing list [email protected] http://mozdev.org/mailman/listinfo/project_owners
_______________________________________________ Project_owners mailing list [email protected] http://mozdev.org/mailman/listinfo/project_owners
