- NSIS Discussion
- Problems with InstallOptions
Archive: Problems with InstallOptions
sHARD>>
2nd October 2004 19:17 UTC
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>>
kichik
2nd October 2004 19:23 UTC
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.
sHARD>>
2nd October 2004 19:29 UTC
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.
sHARD>>
2nd October 2004 19:30 UTC
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.
kichik
2nd October 2004 19:30 UTC
Can you attach a complete example?
kichik
2nd October 2004 19:35 UTC
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.
sHARD>>
2nd October 2004 19:35 UTC
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 ;) )
kichik
2nd October 2004 19:41 UTC
What about the INI file?
sHARD>>
2nd October 2004 19:43 UTC
Originally posted by kichik
What about the INI file?
Attached and renamed to NSI so I can upload.
kichik
2nd October 2004 19:45 UTC
It's Settings, not Setup. Rename your first section and it should work.
sHARD>>
2nd October 2004 19:51 UTC
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