def RemoveSourceFromRegistry(appName, eventLogType = "Application"):
"""Removes a source of messages from the event log.
"""
# Delete our key
try:
win32api.RegDeleteKey(win32con.HKEY_LOCAL_MACHINE, \
"SYSTEM\\CurrentControlSet\\Services\\EventLog\\%s\\%s" % (eventLogType, appName))
except win32api.error, exc:
if exc.winerror != winerror.ERROR_FILE_NOT_FOUND:
raise
评论列表
文章目录