我试图使用python的winreg
库访问Adobe产品(Photoshop、After Effects等)的注册表项,虽然我可以在注册表编辑器中看到HKEY_LOCAL_MACHINE
子项,但python似乎看不到相同的键。是否有需要更改的权限,或者我是否以错误的方式处理此问题
Here is a Screen cap summarizing the results so far
我运行的代码是:
import winreg
i=0
while True:
try:
# self.aeKey = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Adobe\\After Effects\\16.0")
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Adobe\Setup\Reader")
printTest = winreg.EnumKey(key, i)
print(printTest)
i+=1
except WindowsError:
break
结果我得到了
Acrobat Distiller
Acrobat PDFMaker
Adobe AIR
Adobe ARM
CommonFiles
ExtendScript Toolkit
ExtensionManager
PDF Admin Settings
Registration
Repair
Setup
但不是
Adobe Bridge
、Adobe Acrobat
、After Effects
、Photoshop
等等
编辑:我目前正在运行32位Python
评论中的@martineau正好击中了它的头部!我需要更改访问密钥以允许找到64位注册表
现在生产
谢谢你的帮助
相关问题 更多 >
编程相关推荐