phisuio
17th May 2007 21:36 UTC
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?
Red Wine
17th May 2007 21:39 UTC
ReadINIStr $tmpINI "$INSTDIR\setuppath.ini" "Path" "Dir"
phisuio
17th May 2007 21:54 UTC
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?
phisuio
17th May 2007 22:03 UTC
I have to add, that this code is located in: Section "MainSection"
Red Wine
17th May 2007 22:20 UTC
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"