Using the /LANGid for User Input

From NSIS Wiki
Jump to navigationJump to search
Author: jmetro (talk, contrib)


Introduction

Often, I read of people struggling to get enough user input into their script to make their installer "user friendly". One particular solution, which I have used with great success, is to use the /LANG function. Due to some massive changes between the pre-release 2.0a7 and to primary 2.0b1, my code will use 2.0a7 structure.

Requirements Analysis

We have a certain pre-determined number of things which can be installed on any given system. We want the user to choose which application (or package) is to be installed. We want only one installed at a time. (Perhaps, different versions of NSIS, or multiple product demos, or something.)

Theory

If your primary audience speaks a common language the /LANG function is somewhat superfluous. Rather than ignore the function, allow it to work for you. Assign a LANGid to a package. The user begins installation, chooses the "Language" he/she wants to use, and installs it. Of course, the description "English" associated with the LANGid might be changed to "NSIS2.0b1" or "German" might be changed to "Adobe Reader German 5.0.5 with Accessibility".

Disclaimer

I am speaking without the knowledge of my employer. I am supporting an excellent application package. It does have some limitations which require me to think around the problem. But, all in all, it is the best application of its kind on the market today. For the Admins: Note I did not mention my software nor what it does. (Therefore, I'm not trying to sell it.) I'm a technician not a salesman. Any mention of my company's product is for descriptive purposes only. My intent is to show what I did using NSIS, why I did what I did, and how it helped me (and my company).

Practical Use

My application was originally written in 1991. It was designed to help users research, access, and retrieve large amounts of data spanning many years. It was not designed to support multiple data sources.

Recently, I was asked to combine data from a number of different sources and make it researchable using our application. The data amounted to well over 150GB worth of data representing data from 10 banks from between four and eleven years. In the past when combining multiple data sources it was necessary to partition the local hard drive however many times and install a separate research application on each partition. Each application pointed to its own data source.

The application is INI driven, meaning that if the end user had known which drive letter, directory, and data source was wanted it could be edited into the INI to retrieve that data.

NSIS helped automate that process. The solution was very simple and required only a small investment of time (though the decision to abuse this function took slightly longer).

I assigned each of the ten banks a /LANGid.

Name /LANG=1033 "${NAME} ${VERSION}  Baton Rouge Bank and Trust"
Name /LANG=1043 "${NAME} ${VERSION}  First National Bank - Greenville"
Name /LANG=1044 "${NAME} ${VERSION}  Meritrust Federal Savings Bank"
Name /LANG=1045 "${NAME} ${VERSION}  NorthWest Bank of Houston"
Name /LANG=1046 "${NAME} ${VERSION}  Louisiana National Bank"
Name /LANG=1047 "${NAME} ${VERSION}  Merchants Bank and Trust"
Name /LANG=1048 "${NAME} ${VERSION}  First National Bank - St. Mary Parish"
Name /LANG=1049 "${NAME} ${VERSION}  Liberty Bank - Pensacola"
Name /LANG=1050 "${NAME} ${VERSION}  The Peoples Bank of Alabama (Mobile)"
Name /LANG=1051 "${NAME} ${VERSION}  First National Bank - Gonzales"

I renamed the Langdialog headers and added the names of the banks in place of the languages (keeping them associated with their respective /LANGid.

Function .onInit
SetAutoClose true
 
  Push "Arial"
  Push "7"
  Push "Select Bank to Research"
  LangDialog "Please select the bank from which you wish to research." \
             'Baton Rouge Bank and Trust' 1033 \
             'First National Bank - Greenville' 1043 \
             'Meritrust Federal Savings Bank' 1044 \
             'NorthWest Bank of Houston' 1045 \
             'Louisiana National Bank' 1046 \
             'Merchants Bank and Trust' 1047 \
             'First National Bank - St. Mary Parish' 1048 \
             'Liberty Bank - Pensacola' 1049 \
             'The Peoples Bank of Alabama (Mobile)' 1050 \
             'First National Bank - Gonzales' 1051 \
             10
 
Pop $LANGUAGE
StrCmp $LANGUAGE "cancel" 0 +2
Abort
 
FunctionEnd

I then needed a method to cause the installer to edit the INI differently for each selection. I used the functional approach combined with the object oriented !macro system implemented with the new user interface.

I identified the /LANGid thrown in the primary script and called a !macro to edit the INI.

Section "Modern.exe" SecCopyUI
DeleteINISec '$WINDIR\Solution.ini' 'Cold Opticals'
 
StrCmp $LANGUAGE 1033 +1 'onefail'
!insertmacro BANKONE_MACRO
GOTO STARTIT
onefail:
StrCmp $LANGUAGE 1043 +1 twofail
!insertmacro BANKTWO_MACRO
GOTO STARTIT
twofail:
StrCmp $LANGUAGE 1044 +1 threefail
!insertmacro BANKTHREE_MACRO
GOTO STARTIT
threefail:
StrCmp $LANGUAGE 1045 +1 fourfail
!insertmacro BANKFOUR_MACRO
GOTO STARTIT
fourfail:
StrCmp $LANGUAGE 1046 +1 fivefail
!insertmacro BANKFIVE_MACRO
GOTO STARTIT
fivefail:
StrCmp $LANGUAGE 1047 +1 sixfail
!insertmacro BANKSIX_MACRO
GOTO STARTIT
sixfail:
StrCmp $LANGUAGE 1048 +1 sevenfail
!insertmacro BANKSEVEN_MACRO
GOTO STARTIT
sevenfail:
StrCmp $LANGUAGE 1049 +1 eightfail
!insertmacro BANKEIGHT_MACRO
GOTO STARTIT
eightfail:
StrCmp $LANGUAGE 1050 +1 ninefail
!insertmacro BANKNINE_MACRO
GOTO STARTIT
ninefail:
StrCmp $LANGUAGE 1051 +1 tenfail
!insertmacro BANKTEN_MACRO
GOTO STARTIT
tenfail:
MessageBox MB_OK 'YOU HAVE CHOSEN TO CANCEL THIS OPERATION'
QUIT
STARTIT:
;SetOutPath "-"
;FILE 'C:\Documents and Settings\Administrator\Desktop\WhitneyApp\*.*'
 
;SetOutPath "$INSTDIR"
;File "${NSISDIR}\Contrib\UIs\modern.exe"
 
ExecWait "$WINDIR\FSIWIN\Resv500.exe"
POP $LANGUAGE
MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_TOPMOST \
           "Do you wish to view data from another bank now?" IDNO ABORTVIEW
Exec "$WINDIR\FSIWIN\Multibank.exe"
;Exec 'C:\Documents and Settings\administrator.BSYS.000\Desktop\home\MultiBank.EXE'
GOTO NOABORTVIEW
ABORTView:
QUIT
;ABORT "ABORTED BY USER"
 
NOABORTVIEW:
 
SectionEnd

These !macros were included in an include file; they did the lifting.

!macro BANKONE_MACRO
;Current INI's for Baton Rouge Bank (BankOne)
;CldOptical1=x:\BatRg\1992,1992,0,0,1,plat0001
;CldOptical2=x:\BatRG\1993,1993,0,0,1,plat0001
;CldOptical3=x:\BatRG\1994,1994,0,0,1,plat0001
;For test purposes- WriteINIStr '$WINDIR\FSIWIN\WHITNEY.APP\test.ini' \
                                 'start' 'starttest' 'bankone'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical1' \
            'x:\BatRg\1992,1992,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical2' \
            'x:\BatRg\1993,1993,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical3' \
            'x:\BatRg\1994,1994,0,0,1,plat0001'
!macroend
 
!macro BANKTWO_MACRO
;Current INI's for Greenville Bank (BankThree)
;CldOptical1=x:\Grenv\1992,1992,0,0,1,plat0001
;CldOptical2=x:\Grenv\1993,1993,0,0,1,plat0001
;CldOptical3=x:\Grenv\1994,1994,0,0,1,plat0001
;CldOptical4=x:\Grenv\1995,1995,0,0,1,plat0001
;CldOptical5=x:\Grenv\1996,1996,0,0,1,plat0001
;CldOptical6=x:\Grenv\1997,1997,0,0,1,plat0001
;CldOptical7=x:\Grenv\1998,1998,0,0,1,plat0001
;CldOptical8=x:\Grenv\1999,1999,0,0,1,plat0001
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical1' \
            'x:\Grenv\1992,1992,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical2' \
            'x:\Grenv\1993,1993,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical3' \
            'x:\Grenv\1994,1994,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical4' \
            'x:\Grenv\1995,1995,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical5' \
            'x:\Grenv\1996,1996,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical6' \
            'x:\Grenv\1997,1997,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical7' \
            'x:\Grenv\1998,1998,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical8' \
            'x:\Grenv\1999,1999,0,0,1,plat0001'
;For test purposes- WriteINIStr '$WINDIR\FSIWIN\WHITNEY.APP\test.ini' \
                                 'start' 'starttest' 'bankthree'
!macroend
 
!macro BANKTHREE_MACRO
;Current INI's for Meritrust Bank (BankTwo)
;CldOptical1=x:\MeriTrst\1994,1994,0,0,1,plat0001
;CldOptical2=x:\MeriTrst\1995,1995,0,0,1,plat0001
;CldOptical3=x:\MeriTrst\1996,1996,0,0,1,plat0001
;CldOptical4=x:\MeriTrst\1997,1997,0,0,1,plat0001
;CldOptical5=x:\MeriTrst\1998,1998,0,0,1,plat0001
;CldOptical6=x:\MeriTrst\1999,1999,0,0,1,plat0001
;For test purposes- WriteINIStr '$WINDIR\FSIWIN\WHITNEY.APP\test.ini' \
                                 'start' 'starttest' 'banktwo'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical1' \
            'x:\MeriTrst\1994,1994,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical2' \
            'x:\MeriTrst\1995,1995,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical3' \
            'x:\MeriTrst\1996,1996,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical4' \
            'x:\MeriTrst\1997,1997,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical5' \
            'x:\MeriTrst\1998,1998,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical6' \
            'x:\MeriTrst\1999,1999,0,0,1,plat0001'
!macroend
 
!macro BANKFOUR_MACRO
;Current INI's for NorthWest Bank (BankFour)
;CldOptical1=x:\NWBNK\1993,1993,0,0,1,plat0001
;CldOptical2=x:\NWBNK\1994,1994,0,0,1,plat0001
;CldOptical3=x:\NWBNK\1995,1995,0,0,1,plat0001
;CldOptical4=x:\NWBNK\1996,1996,0,0,1,plat0001
;CldOptical5=x:\NWBNK\1997,1997,0,0,1,plat0001
;CldOptical6=x:\NWBNK\1998,1998,0,0,1,plat0001
;CldOptical7=x:\NWBNK\1999,1999,0,0,1,plat0001
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical1' \
            'x:\NWBNK\1993,1993,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical2' \
            'x:\NWBNK\1994,1994,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical3' \
            'x:\NWBNK\1995,1995,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical4' \
            'x:\NWBNK\1996,1996,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical5' \
            'x:\NWBNK\1997,1997,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical6' \
            'x:\NWBNK\1998,1998,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical7' \
            'x:\NWBNK\1999,1999,0,0,1,plat0001'
;For test purposes- WriteINIStr '$WINDIR\FSIWIN\WHITNEY.APP\test.ini' \
                                 'start' 'starttest' 'bankfour'
!macroend
 
!macro BANKFIVE_MACRO
;current INI's for Louisaina National Bank (Bank Five)
;CldOptical1=x:\DonsvLA\1991,1991,0,0,1,plat0001
;Cldoptical2=x:\DonsvLA\1992,1992,0,0,1,plat0001
;CldOptical3=x:\DonsvLA\1993,1993,0,0,1,plat0001
;Cldoptical4=x:\DonsvLA\1994,1994,0,0,1,plat0001
;CldOptical5=x:\DonsvLA\1995,1995,0,0,1,plat0001
;Cldoptical6=x:\DonsvLA\1996,1996,0,0,1,plat0001
;CldOptical7=x:\DonsvLA\1997,1997,0,0,1,plat0001
;Cldoptical8=x:\DonsvLA\1998,1998,0,0,1,plat0001
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical1' \
            'x:\DonsvLA\1991,1991,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical2' \
            'x:\DonsvLA\1992,1992,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical3' \
            'x:\DonsvLA\1993,1993,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical4' \
            'x:\DonsvLA\1994,1994,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical5' \
            'x:\DonsvLA\1995,1995,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical6' \
            'x:\DonsvLA\1996,1996,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical7' \
            'x:\DonsvLA\1997,1997,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical8' \
            'x:\DonsvLA\1998,1998,0,0,1,plat0001'
;For test purposes - WriteINIStr '$WINDIR\FSIWIN\WHITNEY.APP\test.ini' \
                                 'start' 'starttest' 'bankfive'
!macroend
 
!macro BANKSIX_MACRO
;current INI's for Merchants Bank and Trust (Bank Six) [GulfPt]
;CldOptical1=x:\GulfPT\1991,1991,0,0,1,plat0001
;CldOptical2=x:\GulfPT\1992,1992,0,0,1,plat0001
;CldOptical3=x:\GulfPT\1993,1993,0,0,1,plat0001
;CldOptical4=x:\GulfPT\1994,1994,0,0,1,plat0001
;CldOptical5=x:\GulfPT\1995,1995,0,0,1,plat0001
;CldOptical6=x:\GulfPT\1996,1996,0,0,1,plat0001
;CldOptical7=x:\GulfPT\1997,1997,0,0,1,plat0001
;CldOptical8=x:\GulfPT\1998,1998,0,0,1,plat0001
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical1' \
            'x:\GulfPT\1991,1991,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical2' \
            'x:\GulfPT\1992,1992,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical3' \
            'x:\GulfPT\1993,1993,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical4' \
            'x:\GulfPT\1994,1994,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical5' \
            'x:\GulfPT\1995,1995,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical6' \
            'x:\GulfPT\1996,1996,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical7' \
            'x:\GulfPT\1997,1997,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical8' \
            'x:\GulfPT\1998,1998,0,0,1,plat0001'
;For test Purposes - WriteINIStr '$WINDIR\FSIWIN\WHITNEY.APP\test.ini' \
                                 'start' 'starttest' 'banksix'
!macroend
 
!macro BANKSEVEN_MACRO
;current INI's for First National Bank- St. Mary's Parish (Bank Seven) [MorgnCty]
;CldOptical2=x:\MorgnCty\1992,1992,0,0,1,plat0001
;CldOptical3=x:\MorgnCty\1993,1993,0,0,1,plat0001
;CldOptical4=x:\MorgnCty\1994,1994,0,0,1,plat0001
;CldOptical5=x:\MorgnCty\1995,1995,0,0,1,plat0001
;CldOptical6=x:\MorgnCty\1996,1996,0,0,1,plat0001
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical1' \
            'x:\MorgnCty\1992,1992,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical2' \
            'x:\MorgnCty\1993,1993,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical3' \
            'x:\MorgnCty\1994,1994,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical4' \
            'x:\MorgnCty\1995,1995,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical5' \
            'x:\MorgnCty\1996,1996,0,0,1,plat0001'
;For test purposes - WriteINIStr '$WINDIR\FSIWIN\WHITNEY.APP\test.ini' \
                                 'start' 'starttest' 'bankseven'
!macroend
 
!macro BANKEIGHT_MACRO
;Current INI's for Liberty Bank - Pensacola (Bank Eight) [Florida]
;CldOptical5=x:\Florida\1995,1995,0,0,1,plat0001
;CldOptical6=x:\Florida\1996,1996,0,0,1,plat0001
;CldOptical7=x:\Florida\1997,1997,0,0,1,plat0001
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical1' \
            'x:\Florida\1995,1995,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical2' \
            'x:\Florida\1996,1996,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical3' \
            'x:\Florida\1997,1997,0,0,1,plat0001'
;for test purposes - WriteINIStr '$WINDIR\FSIWIN\WHITNEY.APP\test.ini' \
                                 'start' 'starttest' 'bankeight'
!macroend
 
!macro BANKNINE_MACRO
;Current INI's for The Peoples Bank of Mobile Alabama (Bank Nine) [Alabama}
;CldOptical1=x:\Alabama\1991,1991,0,0,1,plat0001
;CldOptical2=x:\Alabama\1992,1992,0,0,1,plat0001
;CldOptical3=x:\Alabama\1993,1993,0,0,1,plat0001
;CldOptical4=x:\Alabama\1995,1995,0,0,1,plat0001
;CldOptical5=x:\Alabama\1990\REPTS,1990REPTS,0,0,1,plat0001
;CldOptical6=x:\Alabama\1990\STMTS,1990STMTS,0,0,1,plat0001
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical1' \
            'x:\Alabama\1991,1991,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical2' \
            'x:\Alabama\1992,1992,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical3' \
            'x:\Alabama\1993,1993,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical4' \
            'x:\Alabama\1995,1995,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical5' \
            'x:\Alabama\1990\REPTS,1990REPTS,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical6' \
            'x:\Alabama\1990\STMTS,1990STMTS,0,0,1,plat0001'
;for test purposes - WriteINIStr '$WINDIR\FSIWIN\WHITNEY.APP\test.ini' \
                                 'start' 'starttest' 'banknine'
!macroend
 
!macro BANKTEN_MACRO
;Current INI's for FNB - Gonzales (Bank Ten) [Gonzales]
;CldOptical1=x:\Gonzales\1993,1993,0,0,1,plat0001
;CldOptical2=x:\Gonzales\1994,1994,0,0,1,plat0001
;CldOptical3=x:\Gonzales\1995,1995,0,0,1,plat0001
;CldOptical4=x:\Gonzales\1996,1996,0,0,1,plat0001
;CldOptical5=x:\Gonzales\1997,1997,0,0,1,plat0001
;CldOptical6=x:\Gonzales\1998,1998,0,0,1,plat0001
;CldOptical7=x:\Gonzales\1999,1999,0,0,1,plat0001
;CldOptical8=x:\Gonzales\2000,2000,0,0,1,plat0001
;CldOptical9=x:\Gonzales\2001,2001,0,0,1,plat0001
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical1' \
            'x:\Gonzales\1993,1993,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical2' \
            'x:\Gonzales\1994,1994,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical3' \
            'x:\Gonzales\1995,1995,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical4' \
            'x:\Gonzales\1996,1996,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical5' \
            'x:\Gonzales\1997,1997,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical6' \
            'x:\Gonzales\1998,1998,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical7' \
            'x:\Gonzales\1999,1999,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical8' \
            'x:\Gonzales\2000,2000,0,0,1,plat0001'
WriteINIStr '$WINDIR\SOLUTION.INI' 'Cold Opticals' 'CldOptical9' \
            'x:\Gonzales\2001,2001,0,0,1,plat0001'
;for test purposes - WriteINIStr '$WINDIR\FSIWIN\WHITNEY.APP\test.ini' \
                                 'start' 'starttest' 'bankten'
!macroend

This solution was expanded upon when I got a call from a customer who had collected well over the intended number of years worth of data (15). He had also customized some data sources such that there were 42 data sources total (including the 15 sources for each of the 15 years).

I used the same principle to collect his sources into groups (different kinds of data, year, type, etc.), and called each of the groups from the NSIS installer.

I hope that this is useful to someone. I realize that many many people are better script writers and programmers than I am, so I hope that my recapitulation is not too obtuse.

Sincerely, Jacob Metro