![]() |
WriteIniStr to insert values on a custom page?
I have created a custom page in MUI including a field that should (if it exists) read a value from registry and pre-fill out the field with this value. So far this is somewhat working:
ReadRegStr $1 HKLM "regpath..." '' WriteIniStr 'custom.ini' 'Field 3' 'State' '$0' However this does not just fill out the value in the custom page, but also alters my custom page ini-file. I want this file to be unaltered since I use it for the setup - How do I avoid this? |
Not quite sure what you mean when you say that you want the ini unaltered while you feed the ini field with the value however did you try SendMessage to feed the specific field when the custom page is initialized?
|
Well, I created the ini just to create the custom dialog, but I want to feed the text-fields with some values. It's not my intention to write any ini-files as the final values are supposed to be written in registry.
SendMessage may seem to do the job, but I don't understand the usage of it. Tried googling, with no help :( |
Why googling when you have the NSIS manual, the included examples and firstly this forum?
SendMessage is built-in NSIS instruction and should be what you're looking for. You'll probably find dozens examples here in forum. |
I think this is the best example I can find, but I'm totally lost at all the addresses :(
I'm new to this... |
So I can't post links? Great...
h t t p://forums.winamp.com/showthread.php?s=&threadid=303378&highlight=SendMessage |
Okay, quick and dirty but you can get an idea:
code: |
does anybody know what's the difference between WriteINIStr and INSTALLOPTIONS_WRITE, how are they different from each other ?
thanks... |
No difference, MUI_INSTALLOPTIONS_WRITE is just a macro using WriteINIStr:
http://forums.winamp.com/showthread.php?postid=1610834 |
ok, thanks for your quick reply, i am using this code display a custom page, but for some reason, this page is not being displayed at all, instead shows the subsequent page, thoughts ?
WriteINIStr "winst\DatabaseServer.ini" "Field 4" "State" "0" !insertmacro INSTALLOPTIONS_DISPLAY "winst\DatabaseServer.ini" |
| All times are GMT. The time now is 17:49. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.