View Single Post
Old 4th September 2011, 21:35   #4
Rajada
Junior Member
 
Join Date: Mar 2011
Posts: 14
To be honest, I acquired the main installer source code from a friend who didn't want to work on it anymore. The flush ini function is nowhere to be found in the script. What is its usage and what effects does it have?

My OS is Windows 7, but the same problem has been confirmed on machines as old as Windows XP. The installer runs as an administrator by default. The ini is installed to a user chosen directory that is confirmed to have a prerequisite application. I can open the ini before, during and after installation and confirm that the non-zero value is there, it just seems like it is being ignored.

This is the tidbit of code that I think is most relevant.

code:
Function checkUpdaterINI

IfFileExists "$INSTDIR\Updater2\updater.ini" 0 copy
${ConfigRead} "$INSTDIR\Updater2\updater.ini" "LastUpdate = " $R1

${If} $R1 >= 17 ; Skip INI, leave it alone
; Greater than or equal to INI number
Goto done

${Else} ; Update INI
; Less than update INI number
Push "$INSTDIR\Updater2\updater.ini" ; file to modify
Push "LastUpdate" ; string that a line must begin with
Push "LastUpdate = 17" ; string to replace whole line with
Call ReplaceLineStr
Goto done
${EndIf}

copy: ; Overide entire INI
SetOutPath "$INSTDIR\Updater2"
File "NerfCP\Updater2\updater.ini"
Goto done


done:

FunctionEnd

Rajada is offline   Reply With Quote