So I have selected a property as two printers seperated with a comma. Yet this fails on both splitString (with illegal String expression) and on the following line ( for %s% in $printers$ do sub_startinstall - with no valid expression for a string list).
Code: Alles auswählen
[Actions]
DefVar $printer$
Defvar $toInstall$
Defvar $printers$
Set $printer$ = GetProductProperty("printer", "")
comment "Start setup program"
set $printers$ = splitString($printer$,",")
for %s% in $printers$ do sub_startinstall
[sub_startinstall]
comment "Installing printer"
set $toInstall$ = "%s%"
DosBatch_install
[DosBatch_install]
%scriptpath%\winprinter.exe --cfg %scriptpath% --add $toInstall$
Code: Alles auswählen
values: ["OFF_PRINTER_1,OFF_PRINTER_2", "Room2_OFF_PRINTER", "Room3_OFF_PRINTER"]