def CustomOptionHandler(cls, opts):
#out=open("c:\\log.txt","w")
print "Installing the Pyro %s" % cls._svc_name_
args = raw_input("Enter command line arguments for %s: " % cls._svc_name_)
try:
createRegistryParameters(cls._svc_name_, args.strip())
except Exception,x:
print "Error occured when setting command line args in the registry: ",x
try:
cls._svc_description_
except LookupError:
return
key = win32api.RegCreateKey(win32con.HKEY_LOCAL_MACHINE,
"System\\CurrentControlSet\\Services\\%s" % cls._svc_name_)
try:
win32api.RegSetValueEx(key, "Description", 0, win32con.REG_SZ, cls._svc_description_);
finally:
win32api.RegCloseKey(key)
评论列表
文章目录