InstallShield的腳本InstallScript中沒有數組,可以用List來實現。以下是List的一個實例:
function testList()
STRING svString;
LIST myList;
INT nResult;
begin
//create a list
myList=ListCreate(STRINGLIST);// orelse a NUMBERLIST
//error check
if (myList=LIST_NULL) then
MessageBox("ListCreate error ",SEVERE);
abort;
endif;
//List add string
svString = "string1";
if (ListAddString(myList,svString,AFTER)<0) then
MessageBox("ListAddString error ",INFORMATION);
abort;
endif;
svString = "string2";
if (ListAddString(myList,svString,AFTER)<0) then
MessageBox("ListAddString error ",INFORMATION);
abort;
endif;
//read myList from first Item
nResult=ListGetFirstString(myList,svString);
//Loop all items
while(nResult != END_OF_LIST)
MessageBox(svString,INFORMATION);
//find the next item
nResult=ListGetNextString(myList,svString);
endwhile;
//destrpy myList
ListDestroy(myList);
end;