Answer the question
In order to leave comments, you need to log in
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}"
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question