T
T
Tesla4o2019-10-15 10:15:11
Installer
Tesla4o, 2019-10-15 10:15:11

How to correctly add a program to startup in Inno Setup?

Wrote the installation of the program in Inno install. After installation, the program starts automatically in hidden mode.
I also wrote that it would start at system startup. Starting after installation works fine, but when the system starts up, it tries to start not in hidden mode and still does not see the libraries that are nearby in the folder with the program and other files on which the program depends and eventually crashes.
This is how I do the autoload:

[Registry]
; секция работы с реестром
Root: HKLM; Subkey:"Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "MyProgramm"; ValueData: """{app}\App2.exe"""; Flags: uninsdeletevalue 
Root: HKLM; Subkey:"Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "App1"; ValueData: """{app}\App1.exe"""; Flags: uninsdeletevalue 
Root: HKLM; Subkey: "Software\Company\ProgramName\Settings"; ValueType: string; ValueName: "Path"; ValueData: "{app}"

And I would like to know more. Is it possible in this program to make a program configuration page to record the entered parameters in the config?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
med1um, 2021-04-15
@med1um

1) Try changing the relative paths in the program to absolute ones.
2) It is better to use HKA, which is equal to HKLM in administrative installation mode, otherwise HKCU:

[Registry]
Root: HKA; Subkey:"Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: ""; ValueData: "{app}\App1.exe"; Flags: uninsdeletevalue

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question