简体   繁体   English

使用 inno setup 制作安装程序时提供启动路径

[英]Provide Startup path when making installer with inno setup

I am using Inno setup to make my exe installable.我正在使用Inno setup使我的 exe 可安装。 I used its wizard to create setup which is working well but I want to make a choice for user to install it in startup of windows.我使用它的向导来创建运行良好的设置,但我想让用户选择在 Windows 启动时安装它。 How can I do this?我该怎么做? Then I got this link as comment suggested but i am unable to understand it!然后我按照评论的建议得到了这个链接,但我无法理解! I just want simple interface for user no manual work for user.我只想要简单的用户界面,无需用户手动工作。

To make an application start when user log in, add an entry to the Software\\Microsoft\\Windows\\CurrentVersion\\Run registry key using an entry in the [Registry] section .要在用户登录时启动应用程序,请使用[Registry]部分中的条目向Software\\Microsoft\\Windows\\CurrentVersion\\Run注册表项添加一个条目。

See also an answer by @jachguate to Inno Setup, APP start When windows start .另请参阅@jachgateInno Setup, APP start When windows start回答

Do not use the [Icons] , that's a legacy solution.不要使用[Icons] ,这是一个遗留解决方案。


To allow user to select whether to configure the automatic start, associate the [Registry] entry with a task , like:要允许用户选择是否配置自动启动,请将[Registry] entry任务关联,例如:

[Tasks]
Name: startup; Description: "Start application when user logs in"

[Registry]
Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; \
    ValueName: "MyProgram"; ValueData: "{app}\MyProg.exe"; Tasks: startup

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM