[pywin32-checkins] pywin32/win32/Lib win32serviceutil.py,1.10,1.11
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2003-10-16 05:31:04
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv6703 Modified Files: win32serviceutil.py Log Message: If PythonService.exe was registered but did not exist, we no longer go ahead and registered for that .EXE anyway. Allow no "pythonClassString" to be specified (useful for py2exe) Index: win32serviceutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32serviceutil.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** win32serviceutil.py 24 Apr 2003 01:30:08 -0000 1.10 --- win32serviceutil.py 16 Oct 2003 05:30:55 -0000 1.11 *************** *** 24,28 **** baseName = os.path.splitext(os.path.basename(exeName))[0] try: ! return win32api.RegQueryValue(win32con.HKEY_LOCAL_MACHINE, "Software\\Python\\%s\\%s" % (baseName, sys.winver)) except win32api.error: # OK - not there - lets go a-searchin' --- 24,34 ---- baseName = os.path.splitext(os.path.basename(exeName))[0] try: ! exeName = win32api.RegQueryValue(win32con.HKEY_LOCAL_MACHINE, ! "Software\\Python\\%s\\%s" % (baseName, sys.winver)) ! if os.path.isfile(exeName): ! return exeName ! raise RuntimeError, "The executable '%s' is registered as the Python " \ ! "service exe, but it does not exist as specified" \ ! % exeName except win32api.error: # OK - not there - lets go a-searchin' *************** *** 213,221 **** def InstallPythonClassString(pythonClassString, serviceName): # Now setup our Python specific entries. ! key = win32api.RegCreateKey(win32con.HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Services\\%s\\PythonClass" % serviceName) ! try: ! win32api.RegSetValue(key, None, win32con.REG_SZ, pythonClassString); ! finally: ! win32api.RegCloseKey(key) # Utility functions for Services, to allow persistant properties. --- 219,228 ---- def InstallPythonClassString(pythonClassString, serviceName): # Now setup our Python specific entries. ! if pythonClassString: ! key = win32api.RegCreateKey(win32con.HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Services\\%s\\PythonClass" % serviceName) ! try: ! win32api.RegSetValue(key, None, win32con.REG_SZ, pythonClassString); ! finally: ! win32api.RegCloseKey(key) # Utility functions for Services, to allow persistant properties. *************** *** 426,430 **** print " --password password : The password for the username" print " --startup [manual|auto|disabled] : How the service starts, default = manual" ! print " --interactive : Allow the service to interactive with the desktop." sys.exit(1) --- 433,437 ---- print " --password password : The password for the username" print " --startup [manual|auto|disabled] : How the service starts, default = manual" ! print " --interactive : Allow the service to interact with the desktop." sys.exit(1) |