Variables

Design-time constants are similar to session variables, but instead of being converted to values at run time, design-time constants get converted at build time. We call them design-time constants because the names you give them only exist at design time. At build time, the name of each design-time constant is replaced by the value that was assigned to it.

Tip: You can also define custom design-time constants on the Constants tab found by choosing Publish > Settings from the program menu and selecting the Constants tab.

The following design-time constants are available in Setup Factory:

#ASC????#

This is a special set of design-time constants. When a constant's name starts with "#ASC", Setup Factory interprets the value assigned to that constant as the ASCII value of a character. Wherever you use that constant, Setup Factory replaces the constant's name with the corresponding character.

For example, if you create a design-time constant named #ASC_QUOTE# and assign the value "34" to it, Setup Factory would replace each occurence of #ASC_QUOTE# in your project with the character whose ASCII number is 34, i.e., a quotation mark ("). Or, you could create a design-time constant to represent the null character (ASCII value 0) by assigning the value "0" to "#ASCNULL#".

#COMMONFILESDIR#

The Common Files folder on your development system. Typically, this is something like: C:\Program Files\Common Files.

#CURRENTDAY#

A number representing the current day of the month, calculated when the setup executable is built.

#CURRENTHOUR#

A number representing the current hour in 24-hour time (e.g. 4:00 PM is 16), calculated when the setup executable is built.

#CURRENTMINUTE#

The current minute, calculated when the setup executable is built. This number is always expressed with two digits, so 4 minutes into the hour will be "04".

#CURRENTMONTH#

A number representing the current month, calculated when the setup executable is built. January is represented by "1" and December is represented by "12".

#CURRENTMONTH2#

A two-digit number representing the current month, calculated when the setup executable is built. January is represented by "01" and December is represented by "12".

#CURRENTSECOND#

The current second, calculated when the setup executable is built. This number is always expressed with two digits, so 4 seconds into the minute will be "04".

#CURRENTYEAR#

The four-digit number representing the current year, calculated when the setup executable is built.

#DATE#

The current date on your development system when the setup executable is built. It's in the format MM/DD/YY. So, if you built the installer on May 23, 2002, #DATE# would be "05/23/02".

#EUROPEANDATE#

The current date on your development system when the setup executable is built, in the European dating format: DD/MM/YY. For example, if you built the installer on May 23, 2002, #EUROPEANDATE# would be "23/05/02".

#ISODATE#

The current date on your development system when the setup executable is built, in the ISO format: YYYY-MM-DD. For example, if you built the installer on May 23, 2002, #ISODATE# would be "2002-05-23".

#JULIANDATE#

The current date on your development system when the setup executable is built, in the form of an integer value representing the number of days since midnight on January 1, 4713 B.C.

You can use #JULIANDATE# along with the System.GetDate action to build setups that expire a certain number of days after they are created. To calculate the number of days that have elapsed since the setup executable was generated, use the formula System.GetDate(DATE_FMT_JULIAN) - #JULIANDATE#.

#PROGRAMFILESDIR#

The path to the Program Files directory on your development system.

#PROJECTFILEDIR#

This is path to the Setup Factory 7.0 project (.SF7) file that you are currently editing. Your project file must be saved in order for this variable to be properly set. If you have not saved your document, this constant will be set to "C:" by default.

This constant is useful if you want to keep your project (.SF7) file and the files in your setup in the same directory. That way you can set #PROJECTFILEDIR# as the files' source directory and your project will be portable to different development systems where paths and drives may change.

#SUFDIR#

The path to the directory where Setup Factory is installed on your development system. Usually this will be "C:\Program Files\Setup Factory 7.0".

#SYSDIR#

The path to the system directory on your development system.

#WINDIR#

The path to the Windows directory on your development system.