Visual Installer: The XRUN command now also supports OS and bitness

SamLogic Visual Installer LogotypeThe XRUN script command in Visual Installer has been updated and extended to handle two more parameters: %OS and %Bitness. These two parameters are optional and allows you to specify in which Windows version and with which Windows bitness (32 bit/64 bit) the program file that XRUN starts can be run in. Below are some more information about the two parameters:

%OS
The %OS parameter is an optional parameter that specifies in which operating system (Windows version) the program can be run in. You can specify if the program can be run in Windows 7, Windows 8, Windows 10, or in any Windows. If you omit this parameter the program will be run in any Windows version.

%Bitness
The %Bitness parameter is an optional parameter that specifies which bitness (32 bit or 64 bit) the operating system (Windows version) must have to let the program start. The program will only be run if the Windows bitness match the bitness that you specify via this parameter. If you omit this parameter the program will be run in a Windows of any bitness (both 32 bit and 64 bit Windows).

Syntax
The definition of XRUN, with all of its parameters, is now:

XRUN %Filename, %Flag, %Param, %OS, %Bitness

The Filename parameter specifies the filename of the executable file. The Flag parameter informs Visual Installer how to start the program. The Param parameters specifies command line parameters to the executable file (if used). And the OS and Bitness parameters are described above

Examples of usage
The example below starts MyWin7App.exe if the operating system is Windows 7. If the operating system is anything else, for example Windows 10, the program is never run.

XRUN  %DESTDIR\MyWin7App.exe, 1, “”, 7

The example below starts MyWin7App.exe if the operating system is a 64 bit Windows 7. If the operating system or bitness is anything else the program is never run.

XRUN  %DESTDIR\MyWin7App.exe, 1, “”, 7, 64

More information about the XRUN command and the %OS and %Bitness parameters is available in Visual InstallerĀ“s User Guide.

See also
> Visual Installer’s Scripting Language