Old 23rd January 2009, 20:29   #1
EdNetman
Junior Member
 
Join Date: Jan 2009
Posts: 2
!insertmacro options question.

I inherited a program written in NSIS, and I am trying to learn this as I go along. There is a form that is called by the !insertmacro command. In this form is a box, and I want to put some "default text" in there so that the user doesn't have to change anything if they don't want to. How would I do this?

-----------------------------------------------------------
The command looks like this right now:
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "DeviceList.ini"
-----------------------------------------------------------
DeviceList.ini:
; Ini file generated by the HM NIS Edit IO designer.
[Settings]
NumFields=2

[Field 1]
Type=Label
Text=Browse to or type in the path (including file name) to the text file containing the list of devices to process.
Left=42
Right=228
Top=14
Bottom=33

[Field 2]
Type=FileRequest
Left=40
Right=240
Top=34
Bottom=47
-----------------------------------------------------------

I want to put the path to a shared folder and a file name in here. EX: "U:\Device Lists\desktops.txt"

Is this possible? I figure it has to be similar to how the installers prompt for the install location but already are pathed to "C:\Program Files\App Name."

Thanks!

~Ed
EdNetman is offline   Reply With Quote
Old 23rd January 2009, 20:45   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
try...
code:

!insertmacro MUI_INSTALLOPTIONS_WRITE "DeviceList.ini" "Field 2" "State" "U:\Device Lists\desktops.txt"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "DeviceList.ini"

Animaether is offline   Reply With Quote
Old 23rd January 2009, 21:16   #3
EdNetman
Junior Member
 
Join Date: Jan 2009
Posts: 2
WOW, that worked perfectly!

I spent an hour on goggle and couldn't find squat, you are the man!
EdNetman is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump