def OutlookPath():
"""Function to retrieve the path to Outlook from the registry"""
aReg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
aKey = winreg.OpenKey(aReg, r"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE")
# prepend unused variables with "dummy_" to keep PyLint happy
dummy_n, v, dummy_t = winreg.EnumValue(aKey, 0)
winreg.CloseKey(aKey)
winreg.CloseKey(aReg)
return v
评论列表
文章目录