PDA

View Full Version : Use of #pragma



NewsArchive
09-12-2011, 12:31 AM
Hi

I want to pass a variable into my installer at compile time. I currently do
that with #pragman WebInstall successfully. However I ideally want to set
the value of a variable in my script %ProgramType% = 1024 or 2048 depending
on the external variable.

Is this possible or would I have to use an external text file to do that.
i.e. set that before the compile then during the compile read that file and
set the variable using something like #GetIni

TIA

John Fligg

NewsArchive
09-12-2011, 12:32 AM
Hi John,

> I want to pass a variable into my installer at compile time. I currently
> do that with #pragman WebInstall successfully. However I ideally want to
> set the value of a variable in my script %ProgramType% = 1024 or 2048
> depending on the external variable.
>
> Is this possible or would I have to use an external text file to do that.
> i.e. set that before the compile then during the compile read that file
> and set the variable using something like #GetIni

Absolutely no problem. You have several different options. You can
retrieve the value for variables via the command line, from an INI file (or
the registry) or you can prompt for it at compile time.

See the "#const", "#get ini", "#get registry" or "#get file info" compiler
directives. And see SKU Management Wizard and Command Line Options
(Compiler).

And see the "Read Constant from INI.sb7" example.

Friedrich

NewsArchive
09-12-2011, 12:33 AM
Thanks as ever Friedrich.

John