Archive: Ini file


Ini file
Hi,
when uninstalling, I want to read out an INI-file, thats its content:

[Path]
Dir=C:\Program\Files

The source code is:
ReadINIStr $tmpINI $INSTDIRsetuppath.ini Path Dir
MessageBox MB_OK $tmpINI

but the messagebox is always empty, anyone has an idea?


ReadINIStr $tmpINI "$INSTDIR\setuppath.ini" "Path" "Dir"


Hi, thanks, I somewhere forget an slash in the source code.
Perhaps you can also help me with this, this is my source:

StrCpy $filesFoundIn "C:\Files"
SetOutPath $INSTDIR\$Region\$SubRegion\$QuadName\Textures
SetOverwrite ifnewer
File $filesFoundIn"\file1.dat"
File $filesFoundIn"\file2.dat"
...

it says, that there are not files found, any idea?


I have to add, that this code is located in: Section "MainSection"


That's a common misunderstand :)
File is a compile time instruction while a variable takes action on runtime so obviously they can't be mixed.
You should use a definition instead, e.g.
!define filesFoundIn "C:\Files"
.........
File "${filesFoundIn}\file1.dat"