添加我的Windows程序到启动注册表与文件写入

时间:2016-06-02 14:51:33

标签: python windows startup

我有windows的python gui(tkinter)应用程序。我想用注册表将它添加到自动启动。注册表项存在:

REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /V "My App" /t REG_SZ /F /D "C:\path_to_file\1.exe"

使用Windows加载应用程序启动,但失败并显示" [错误5]"代码错误:

os.mkdir(path)

双击exe手动启动工作正常。如何将我的程序添加到客户端的Windows自动启动?

ps:在Windows 7 x64,python 2.7上测试

0 个答案:

没有答案