my current script:
edit
Now i have 2 problems:Name writepath
OutFile writepath.exe
;InstallDir "$PROGRAMFILES\Rockstar Games\Grand Theft Auto San Andreas"
Page directory
Page custom writepath
Page instfiles
Section
SetOutPath $INSTDIR
GetFullPathName $0 ..
SectionEnd
Function writepath
;WriteINIStr $DESKTOP\GTASA_Start.ini MOD-1 path $INSTDIR
WriteINIStr $DESKTOP\GTASA_Start.ini MOD-1 path $0
FunctionEnd
Section
DetailPrint $0
DetailPrint $INSTDIR
SectionEnd
1. the installer writes only the content of $INSTDIR into ini but not the content of any other variable like $0
Why?
2. if i use InstallDir "$PROGRAMFILES\Rockstar Games\Grand Theft Auto San Andreas"
for Page directory
and choose then in the installer Page directory a folder which have another name than Grand Theft Auto San Andreas,
for example: G:\1-Mod-Grand Theft Auto San Andreas
then $INSTDIR returns G:\1-Mod-Grand Theft Auto San Andreas\Grand Theft Auto San Andreas
It creates the folder of InstallDir as subfolder of the choosen directory
How to prevent that?