[Buildbot-devel] buildbot as a service on windows 7

tom fogal tfogal at alumni.unh.edu
Tue Mar 23 21:29:18 UTC 2010


I'm trying to setup a buildbot slave as a service on Windows 7.  I've
had this running as administrator before, but I'm trying to be a good
boy and run it as a non-privileged user now.  Unfortunately, it wants
to create a registry key during startup, and can't:

  Traceback (most recent call last):
    File "C:\Python26\lib\site-packages\win32\lib\win32serviceutil.py", line 806,
  in SvcRun
      self.SvcDoRun()
    File "C:\python26\scripts\buildbot_service.py", line 217, in SvcDoRun
      if not self._checkConfig():
    File "C:\python26\scripts\buildbot_service.py", line 177, in _checkConfig
      "directories")
    File "C:\Python26\lib\site-packages\win32\lib\win32serviceutil.py", line 265,
  in GetServiceCustomOption
      key = win32api.RegCreateKey(win32con.HKEY_LOCAL_MACHINE,
  "System\\CurrentControlSet\\Services\\%s\\Parameters" % serviceName)
  error: (5, 'RegCreateKey', 'Access is denied.')

I attempted to create the registry key manually, but the code
(GetServiceCustomOption) attempts to create the key without checking
if it already exists.  Or, maybe the API works in such a way that one
needs to create the key before you can query its existence; I'm not all
that familiar with windows.

This seems like a generic pywin32 issue, not bbot specific, and yet I
cannot find any threads about it.  Perhaps people just aren't using
python-based services on Windows 7?  Anyway, an acceptable solution
for me would be to grant my user registry-key-creation privileges, but
I can't seem to figure out how to allow that without making them a
full-on administrator (defeats the whole point, really).  Ideas?

-tom




More information about the devel mailing list