Hi,
I am trying to display two custom pages to users.
The following script showning only one custom page.
I want to create two custom pages and prompt for user infomation and then writting that information to file.
Can anyone help me on that.
Here is the code
Page custom SetCustom "" ":Configuring Properties Files"
Page custom SetCustom1 "" ":Files"
Page instfiles
Function SetCustom1
Push ${TEMP3}
InstallOptions::dialog "$EXEDIR\medius.ini"
Pop ${TEMP3}
FunctionEnd
Function SetCustom
Push ${TEMP1}
InstallOptions::dialog "$EXEDIR\properties.ini"
Pop ${TEMP1}
FunctionEnd
Section "Configure Properties"
ReadINIStr ${TEMP1} "$EXEDIR\properties.ini" "Field 1" "State"
MessageBox MB_OK "Register contains ${TEMP1}"
Strcpy $DBUSER ${TEMP1}
ReadINIStr ${TEMP1} "$EXEDIR\properties.ini" "Field 2" "State"
Strcpy $DBPASSWORD ${TEMP1}
${ConfigWrite} "D:\abc.properties" "DBUSERID=" "$DBUSER" $R0
${ConfigWrite} "D:\abc.properties" "DBUSERPASSWORD=" "$DBPASSWORD" $R0
SectionEnd
Section "Files"
ReadINIStr ${TEMP3} "$EXEDIR\medius.ini" "Field 1" "State"
Strcpy $DBUSER1 ${TEMP3}
ReadINIStr ${TEMP3} "$EXEDIR\medius.ini" "Field 2" "State"
Strcpy $DBPASSWORD1 ${TEMP3}
${ConfigWrite} "D:\xyz.txt" "DBUSERID=" "$DBUSER1" $R0
${ConfigWrite} "D:\xyz.txt" "DBUSERPASSWORD=" "$DBPASSWORD1" $R0
SectionEnd
Regards
Sandeep
Multiple Custom Page
2 posts
Make sure your INI file actually exists and also make sure that it's a valid InstallOptions INI file (i.e. you may have errors in it).
I'm not sure why you're doing this:
Push ${TEMP1}
InstallOptions::dialog "$EXEDIR\properties.ini"
Pop ${TEMP1}
InstallOptions always pushes a value on the stack, so you need two Pop ${TEMP1} after the InstallOptions call.
Or, if you remove the Push ${Temp1}, and check the value of ${Temp1} after the Pop, you should find that it contains "error"
-Stu
I'm not sure why you're doing this:
Push ${TEMP1}
InstallOptions::dialog "$EXEDIR\properties.ini"
Pop ${TEMP1}
InstallOptions always pushes a value on the stack, so you need two Pop ${TEMP1} after the InstallOptions call.
Or, if you remove the Push ${Temp1}, and check the value of ${Temp1} after the Pop, you should find that it contains "error"
-Stu