PDA

View Full Version : set %AppFolder% in ini file (Newbie)


mierlp
09-18-2007, 06:59 PM
hi,

i can't figure out how i can use the var. %AppFolder% in a ini file.
The user selects the installation path during installation...lets say
C:\Program Files\LOGDB. Within the directory C:\Program Files\LOGDB
there's a sub-directory DATA created which contains the databases.

After the installations i would like to edit the existing .ini file so it
contains the installation path including the DATA directory

Ini files looks like this :
[MAP]
DB=

greetz PEter

Adam
09-19-2007, 12:47 PM
Use code like this:


AppFolder = SessionVar.Expand("%AppFolder%");
INIFile.SetValue(AppFolder.."\\My Settings.ini", "Section", "Value", AppFolder.."\\DATA");


Of course you will have to adjust this for your scenario but it should be a good starting place

Adam Kapilik