def add(name, application):
"""add a new autostart entry"""
key = get_runonce()
try:
winreg.SetValueEx(key, name, 0, winreg.REG_SZ, application)
except WindowsError as e:
print(e)
winreg.CloseKey(key)
文章目录