Example #1
0
 def _AccessRootKey(self):
     if self._root_key is None:
         # Don't use winreg.KEY_WOW64_64KEY since it breaks on Windows 2000
         self._root_key = winreg.CreateKeyEx(self._key_spec.winreg_hive,
                                             self._key_spec.path, 0,
                                             winreg.KEY_ALL_ACCESS)
         self.parsed = self._key_spec.path
     return self._root_key
Example #2
0
def _GetServiceKey():
  """Returns the service key."""
  global _service_key

  if _service_key is None:
    hive = getattr(winreg, config.CONFIG["Client.config_hive"])
    path = config.CONFIG["Client.config_key"]

    # Don't use winreg.KEY_WOW64_64KEY since it breaks on Windows 2000
    _service_key = winreg.CreateKeyEx(hive, path, 0, winreg.KEY_ALL_ACCESS)

  return _service_key
Example #3
0
    def setUpClass(cls):
        super(InstallerTest, cls).setUpClass()

        winreg.CreateKeyEx(winreg.HKEY_LOCAL_MACHINE, _TEST_KEY_PATH)