Archive: Problems with InstallOptions


Problems with InstallOptions
For the installer I am creating I want to have a simple welcome page with a few instructions, so I created the INI file for the page as well as the creator and reserved the file. I then used the following example:

Function customPage
GetTempFileName $R0
File /oname=$R0 customPage.ini
InstallOptions::dialog $R0
Pop $R1
StrCmp $R1 "cancel" done
StrCmp $R1 "back" done
StrCmp $R1 "success" done
error: MessageBox MB_OK|MB_ICONSTOP "InstallOptions error:$\r$\n$R1"
done:
FunctionEnd

Renaming the function and filename to their respective proper names. InstallOptions always errors out with "error finding config". I checked, and the file is being properly extracted. I thought maybe it was not being extracted before the page was ready for generation, but determined that was not the problem. I also tried manually setting the path to the original path of the config file where it would still reside, but it would still offer a "error finding config". Any clues? Help is greatly appriciated. Thanks

-sHARD>>


You can also get this error message if the INI file contains no fields. For example, if [Settings]\NumFields is 0 or does not exist.


Originally posted by kichik
You can also get this error message if the INI file contains no fields. For example, if [Settings]\NumFields is 0 or does not exist.
I checked my INI against an one from the examples (which works), it is exactly the same except for changes in text and captions.

Originally posted by sHARD>>
I checked my INI against an one from the examples (which works), it is exactly the same except for changes in text and captions.
Forgot to add, would this error occur if the syntax in the file was wrong? Like I said, I checked it against the other, but it would be interesting to know if it uses the same error for syntax problems too.

Can you attach a complete example?


Originally posted by sHARD>>
would this error occur if the syntax in the file was wrong?
Only if it's wrong enough to make it miss [Settings]\NumFields.

Originally posted by kichik
Can you attach a complete example?
Sure, just be warned it is a long script (WASTE installation script in case you have ever heard of it ;) )

What about the INI file?


Originally posted by kichik
What about the INI file?
Attached and renamed to NSI so I can upload.

It's Settings, not Setup. Rename your first section and it should work.


Originally posted by kichik
It's Settings, not Setup. Rename your first section and it should work.
Wow, I hate it when I make incredibally stupid mistakes like that. Thanks a lot! :D