简体   繁体   中英

Provide Startup path when making installer with inno setup

I am using Inno setup to make my exe installable. 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. 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 .

See also an answer by @jachguate to Inno Setup, APP start When windows start .

Do not use the [Icons] , that's a legacy solution.


To allow user to select whether to configure the automatic start, associate the [Registry] entry with a task , like:

[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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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