My software installer allows the user to start the application when the user logs in. It does that like this:
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; \
ValueType: string; ValueName: "appname"; ValueData: "{app}\appname.exe"; \
Tasks: startup
It is based on the answer here (https://stackoverflow.com/a/40147393/2287576). But the software itself allows the user to modify the start-up state (by programmatically adding/removing the same registry data).
How can I adjust the Inno Setup Script to detect if:
- It is upgrading and
- If it is already in the Startup list
I would like the check state of the task to match the current startup state (if upgrading)