New setup dialog box in Visual Installer: User Options

We have added a new setup dialog box to the Professional version of Visual Installer. The name of the dialog box is User Options and it is a general dialog box where the user can select and unselect options that you add to the setup project. These options co-operates with conditional statements in Visual Installer’s scripting language and with Visual Installer’s Registry tab. Below is an example of how the User Options setup dialog box may look like and how it can be used:

In the example above we have added three options to the setup dialog box. The user can select and unselect the options of his/her choice.

To activate this dialog box, you need first open the Dialog boxes tab in Visual Installer’s editor and check the User options option:

Then you can click on the button marked “…” to the right of the option. This will open a new dialog box in the Visual Installer editor with the title User Options. Below we have filled the dialog box with the text and options that is needed to create the setup dialog box in the example above:

As you see, it is very easy to create a setup dialog box with your own options. You just need to enter a title, a short description text and your options. And it is done!

Co-operates with Visual Installer’s scripting language and ‘Registry’ tab
The main purpose of this new option dialog box is to let the end-user decide which script lines to execute and which keys and values to add to the Registry, during the setup process. This is a more flexible way to handle user choices than file components (file groups) because you don’t necessary need to copy files based on user choices; instead you can use Visual Installer’s whole scripting language to do whatever you want. This is useful if some special operations must be done, based on user choices.

Below we show how Visual Installer’s scripting language can co-operate with the User Options dialog box:

And below we show how the Registry tab in Visual Installer can co-operate with the User Options dialog box:

Scripting language
In Visual Installer’s scripting language we have added a new condition check, IF OPTION(n), that can be used to check which options the user has selected in the User Options setup dialog box. We have added a similar condition check to Visual Installer’s Registry tab: IF_OPTION(n).

The IF OPTION(n) condition in the script language can check both if an option is ON (selected) or OFF (unselected). So for example to examine if option 2 was selected by the end-user, you can enter the following condition:

IF OPTION(2)=ON

END IF

If you for example need to examine if option 3 was not selected, you can enter the following condition:

IF OPTION(3)=OFF

END IF

‘Registry’ tab
The condition check in the Registry tab works in a similar way. IF_OPTION(n) or IF_OPTION(n)=ON can be used to examine if an option was selected by the end-user. IF_OPTION(n)=OFF can be used to check if an option was not selected.

If you use IF_OPTION(n) and the option number n was selected by the end-user, the key or value will be added to the registry. The example below shows how to examine if option number 1 is selected, and if yes, add a value to registry:

See also
> Tip: How to use the ‘User Options’ dialog box with script

Visual Installer’s scripting language now supports ELSE

SamLogic Visual Installer LogotypeWe have updated Visual Installer’s built-in scripting language so it now supports an ELSE statement. This will help creating simpler scripts in some situations.

For example, assume that you want to run a particular and specialized application or setup program in a specific version of Windows, and a general application or setup program in all other versions of Windows. Before you needed to cover all Windows version with IF statements and OS checks, but now you only need to check for one OS, and add an ELSE statement to cover the rest. Example:

Example how to use ELSE

With the SETENV command you can set environment variables from Visual Installer

In this blog post we explained how to use Windows’ environment variables in Visual Installer; for example as a part of a file path. You can also create or change values for environment variables in the system during an installation by using a script command in Visual Installer’s scripting language. The name of the command is SETENV and you can use this command to set an environment variable to a specific value. If the environment variable does not exists, it will be created. If it already exists, its value will be updated.

Examples of usage
The example below shows how to use the SETENV command to set an environment variable with the variable name MyVariable to the value MyValue:

// Example 1: Set MyVariable = MyValue
SETENV MyVariable, MyValue

You can also use Visual Installer’s variables (for example %DESTDIR) when you set values. The example below shows how to set an environment variable with the variable name MyAppsFolder to the path %DESTDIR\MyApps:

// Example 2: Set MyAppsFolder = %DESTDIR\MyApps
SETENV MyAppsFolder, %DESTDIR\MyApps

The picture below shows same examples in Visual Installer’s scripting editor:

SamLogic’s Newsletter Issues in 2015

We have an international newsletter that is targeted for our international customers where we publish information and news related to our products and our company. We send the newsletter about 1-2 times / month. In the newsletter you can read about:

  • Information about SamLogic Software´s products
  • Tips and tricks for SamLogic Software´s programs
  • Technical and non-technical articles
  • Videos (tip videos and information videos etc.)
  • Special offers

Below you can view all newsletter issues that we sent during 2015:

> 13/2015 – Most read articles, read blog posts and viewed videos
> 12/2015 – How to code sign a setup package in Visual Installer
> 11/2015 – How to build a setup package or menu interface silently using a batch file
> 10/2015 – How to create a menu interface in any language in the world
> 09/2015 – A new wizard in CD-Menu Creator makes it easy to create multiple menu pages
> 08/2015 – New 2015 versions of our products – All adapted to Windows 10
> 07/2015 – CD-Menu Creator 2015 is coming soon
> 06/2015 – Visual Installer 2015 is coming soon
> 05/2015 – How to remotely control a Windows application from a tablet
> 04/2015 – Special issue about 64 bit installations
> 03/2015 – How to create a menu interface with 3 columns with buttons
> 02/2015 – New update of Visual Installer 2014
> 01/2015 – Most read articles, read blog posts and viewed videos

Subscribe to our newsletter
If you want to subscribe to our newsletter you can visit the web page below:
> Subscribe to SamLogic Software’s newsletter