How to open a shortcut folder at the end of the installation
Suppose you want to open a folder with shortcuts when the installation is complete. The user should be able to avoid this action during the installation process. A lot of installers have a special option for this purpose, but CreateInstall allows you to open the shortcut folder at any time and depending on various conditions. Let's see how our installer accomplishes this task .
Step 1. Add a 'Open Shortcut Folder' checkbox in the Additional Checkbox list of the Dialog box Setup Path. Specify the name of the variable, which equals 1 if the checkbox is checked, and 0 otherwise. The variable name can be chosen arbitrarily, for instance, openshfolder. Also, specify the text for the checkbox. It should be noted that the checkbox can also be placed in the Dialog boxes Finish or Settings commands.
Dialog - Setup Path
Step 2. By default, the checkbox is not checked, because the variable has not been determined. If you want the checkbox to be checked, then insert the Set Variables command above and assign the variable to 1. In our case, add a value of 1 to the 'openshfolder' variable.
Step 3. To open a folder with shortcuts we need to know the full name of the folder. First, we look where our shortcuts are created in Shortcut - Create and Shortcuts [List] commands. By default, if you have specified PROGRAM GROUP, then a folder with shortcuts is located in the following path: #progpath#\#progname#, Where #progpath# is the predefined path for Start Menu - Programs on user's computer, and #progname# is the name of your application. It can see and change the program name on the Project tab - Program Details - Program Name.
Program Name #progname#
Use the Shell Execute command to open the shortcut folder. If you specify a custom path for the shortcut folder then specify the same path in the Shell Execute command. Insert this command at the end of your script and specify the following parameters
Path: CUSTOM PATH
File name: #progpath#\#progname#
If Condition: openshfolder
Shell Execute
If you want to open a shortcut folder without any conditions, then use the Shell Execute command with the required folder. In this case, leave the If Condition parameter blank.
Download the example project open-shortcut-folder.ci