user1762109
user1762109

Reputation:

Save installation path to INI file

I got the mission to save the actual installation path into an INI file (to a certain key). During installation, the user get a default folder to install the app, but he can change it in run-time (in the wizard). How to catch the final folder path he decided about, and place it into my INI file?

Thank you!

Upvotes: 2

Views: 1145

Answers (1)

Deanna
Deanna

Reputation: 24283

You can save the value using an [Ini] entry and the {app} constant.

[INI]
Filename: "MyProg.ini"; Section: "InstallSettings"; Key: "InstallPath"; String: "{app}"

Note that as Gavin pointed out, an application can determine it's own path so this shouldn;t normally be needed unless external applications require it in which case, a registry entry is a lot easier to find:

[Registry]
Root: HKLM; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"

([Ini] answer curtosy of TLama's deleted post.)

Upvotes: 1

Related Questions