Archive: Help With Install Options- So So Close... I think...


Help With Install Options- So So Close... I think...
Hi everyone-
I've posted on here before and everyone was great helping me out, I was in the irc room earlier this evening and had some excellent help, but I've hit another wall and I think I'm so so close so I figured I'de ask on here. First I'll explain the goal:

I'de like for the installation to install all the files like normal a normal installation would, following that, 2 custom pages come up(which I have succesfully created and implemented into the setup), each page has something like 4 fields of information that needs to be filled in, mainly paths to directorys and a few locations of executable files. From there I'de like for the setup to then take the information from each field and place it into its spot in config .xml file that was installed along with the other files in the setup.

Whats happening:
I can get the install to work fantastic, the pages to show up, the fields to work (collect and display the data perfect), and the installation finish. But none of the data is being written to the .xml file.

Via the irc room I set the custom page to run a function once loaded, and that function has the write to file info in it. From what I can see the data isnt being put into any varibles(?) to be placed into the file. I know the function works because if I replace the $R0 variable and put words or something of the like, it will show up in the xml file.
Any help would be great, I'll attach the script for the curious. Thanks so much to everyone!

-matt


Put a messagebox in .onLeaveFunc to see what $R0 is.

-Stu


You are using MUI_INSTALLOPTIONS_WRITE instead of MUI_INSTALLOPTIONS_READ. You are writing the content of $R0 into the INI file, not reading it from the INI file.

Are you sure .onLeaveFunc is called? Its name might start with a dot, but it's not an installer callback function and I don't see it referenced anywhere.


Thank you both for the replies, I updated my script alittle and have updated the attachment. I put in the msg box and it does come up, but nothing shows for the $r0 value and to see if it was working I changed the write text from $R0 to "testers" and it wrote it perfect. I still have no clue whats happening or why it isnt putting the data to the $R0. Any ideas? Thanks so much for all the help so far, please excuse my newbness. heh

-matt

Edit: You cant edit posts after a certain time, so I've uploaded it to my server. Sorry and thanks again for looking!
xlobbyinstaller.nsi


Did you miss kichik's post?
You're using:
!insertmacro MUI_INSTALLOPTIONS_WRITE $R0 "CPA.ini" "Field 6" "State" when it should be:
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "CPA.ini" "Field 6" "State"

With !insertmacro MUI_INSTALLOPTIONS_WRITE $R0 "CPA.ini" "Field 6" "State"
you're effectivly writing to an INI file named $R0, a section in it called "CPA.ini", a key named "Field 6" and a value of "State"!

-Stu


Oh my lord, I apologize for the misunderstanding! I just doubled checked it, and had the field placed in the wrong function! I tried it the correct way but in the wrong place and then just reverted it back to what I had it. End of story, you guys are the best!

-matt