Create project Let's suppose you want to create a package for a text editor you have created. We will use a sample editor application built by us. This editor has some characteristics:. For the editor to function properly some registry keys must be present on the target system. Suppose this editor is developed using Visual Basic.
In order to work, it needs Visual Basic 6 Runtime to be installed on the target machine. It has a type of file that it associated to, called, say, EDI file. After launching Advanced Installer, you will be presented with a dialog where you can choose the type of the project you want to create. Select Professional and press the Create Project button. The new project has been created and from now on you will edit it. Save the project and give it an appropriate name - let's say 'Tutorial' for this example.
English is the default project language, but you can change it to any of the languages known by Advanced Installer. Add files and folders to your project The next step is to add to the project the files and/or folders that compose your application. You will need an EDI file to test the editor's file associations. Since it is a custom type of file, you will have to create it. Use any text editor to create a 'foo.txt'. Then rename it 'foo.edi'. Select “Files and Folders” from the “Resources” menu on the left pane.
Visual Basic.NET is a very powerful programming language from Microsoft. This is one of the most widely used programming languages used to build powerful and robust programs on the Microsoft Visual Studio.NET. This one is a very nice detailed Visual Basic.NET tutorial for the beginners. Mar 22, 2018 - Introduction There is a limited InstallSheild which is supplied with VC++ 6.0. This is an article to demonstrate how to use Installshield to build an.
Click on the Add Files toolbar button and select the files of your application, use our. Repeat this step to include the Foo.edi file you have created. Once the files are added, their names will appear in a list in the right-side pane of the view. Now, let's make a shortcut to the Sample.exe file you just added.
Right-click on this file and choose “New Shortcut To - Installed File”. In the newly appeared dialog choose a name for your shortcut and a location - like in the following screenshot. Press the OK button and the shortcut will appear listed in the application shortcut folder. For more information please see the page.
Add registry keys and values to your package Let's suppose that your application needs two registry entries. These are located in the 'Software Manufacturer ProductName Settings' key. One registry value is named 'AppPath' and stores the path where your application is installed. The other one is named 'AppSettings' and contains a value that shows the current settings of the application. On install, it has the value '36'. The “Registry” page.
In the tree, select the 'Software Manufacturer ProductName' key. Click on the New Key toolbar button to create a key. Edit the key name to 'Settings'. Add a value for it using the New Value toolbar button. In the 'Name' text field enter the name of your first key: 'AppPath'.
Press the Folder. button and select 'Application Folder'. Since 'Data' is a text field the value that it contains will be expanded at install time into the full path to your application's location. Use the same steps to create the 'AppSettings' value. This time when creating the new key select 'Binary' and type in the 'Data' field the number '36'. Once the registry keys and values are added, you can see them in the right-side pane of the view.
For more information please see the page. Set launch conditions Go to the 'System' tab of the page. If you wish that your application should be installed only on a particular set of operating systems make sure that the rest of the operating systems are not ticked in the view. Create a custom launch condition which will make sure that the package will not be installed if the file 'example.txt' does not exist on the partition on which Windows is installed. For this you can follow these steps:. Create a File search in the page.
Set the file name to example.txt. Rename the search to FILE. Use the context menu to add a folder as the location of the search. Set this folder to WindowsVolume (this is resolved to the partition on which Windows was installed). Use the 'Test Search' button on the toolbar to test the search. Go to the tab in the 'Launch Conditions' page. Press the New.
button to add this launch condition: Condition: FILE Description: This application cannot be installed because of the file 'C: example.txt' does not exist. Add Prerequisites Let's suppose that your application requires the 'My Application.exe' installation package to be installed. This package will install an application and it will create the registry entry HKEYLOCALMACHINE Software My Application Version with the value 1.0. If this application is not already present on the target machine, your package will have to install it before deploying your application. For this, you can use the 'Prerequisite' feature. Go to the 'Prerequisites' page. Select 'New Package Prerequisite' from the context menu.
Then select 'My Application.exe' installation package from disk. You can also set the location of the prerequisite as a URL from where the file can be downloaded, by selecting 'New URL prerequisite' from the context menu. Or, you can use the 'New Prerequisite Wizard' option from the toolbar to guide you through defining your prerequisite.
Advanced Installer comes with a list of commonly used prerequisites, for which all the settings are already defined. After the properties of the prerequisite have been set, you need to set the detection criteria by using the tab. Presuming that the prerequisite application creates a registry entry, you can select 'Install prerequisite based on conditions' and define a detection criteria in the section by setting the registry as a target for the new search. For more information please see the page.
Create new file extensions and make file associations Your application uses files with a particular extension (in our example that is 'edi'). You may want to associate that type of files to be opened or edited with your application. Advanced Installer helps you do this in a very simple way. Choose “File Association” in the left pane. Use the New Extension toolbar button to create a new extension: 'edi'.
Enter a description of this extension in the appropriate field in the right-side pane. You may choose an icon to be displayed for all the files with the extension you created. For every extension contained in your application, you need to add at least one verb. The name of the verb will be seen in the context menu that appears when you right-click on a file of 'edi' type in Windows Explorer. In this example, you should leave the defaults settings. The effect is that when you double click a file or you choose the 'Open' action from a context menu of an 'edi' file, the application is automatically launched with the command line argument specifying the absolute path of the chosen file.
For more information please see the page. Organize your application into features Giving the user the possibility to install only some part of your application can be done easily with Advanced Installer. To do this you must organize your application into several features. To see the structure of your application select the page on the left pane. At this moment, all your files are included into a single feature, called 'MainFeature'. Create a new feature that contains the 'foo.edi' example file. In the 'MainFeature' only the 'Sample.exe' component will be present.
![Installshield for vb6 tutorial video download Installshield for vb6 tutorial video download](http://www.filedudes.com/images/screenshots/41682.gif)
Select 'Product' in the tree and click the 'New Feature' toolbar button. Drag and drop the 'foo.edi' component in the newly created feature. To make this feature optional (i.e. To be installed only on Custom or Full types of installation) select in the 'Not installed' option.
![Tutorial Tutorial](/uploads/1/2/5/3/125356355/540695031.jpg)
For more details about features and components see the page. Set dialogs to guide the user during install Go to the page.
Here you can select the dialogs that appear during install. In our example, you will add two more dialogs:. A dialog in which the user to choose the type of installation (Typical, Complete, Custom). A dialog for displaying a license agreement text. This will allow the user to choose to view the ReadMe file or to launch the application at the end of the installation. Setup type dialog:. Right-click the Welcome dialog from the left-side pane.
Choose “Add Dialog” from the context menu. Select the “SetupTypeDlg” dialog. License agreement dialog:. Repeat the previous procedure but select the “LicenseAgreementDlg” dialog from the “Add Dialog” window. Click on the Browse button from the right-side pane to select from your machine the Rich Text Format file containing the license agreement. Add to your package the ReadMe file for your application (use the “Files and Folders” options page).
Select the “ExitDialog” dialog from left-side pane. In the right-side pane, check the “Show 'View ReadMe' option” checkbox; you will be prompted to choose the ReadMe file.
Choose the file you just added to your package. Check the “Launch Application at the end of installation” checkbox and select from your package the application that will be launched at the end of the installation. Note that the user can choose not to see the ReadMe file or to launch this application.
For more information please see the page. Build and test the package again. Add custom actions to your installation package Custom actions are useful when you need to perform a specific action during installation and there is no other way to do it.
The custom action is entirely defined by you; in Advanced Installer you only specify the file that contains it, and some parameters for its execution. You can add custom actions contained in EXE files, DLL files, VBScript files or JavaScript files.
Select “Custom Actions” in the left pane in order to add a Custom Action. Select the 'Install Execution Stage' - 'Add Resources' action group in the left-side pane. Choose from the toolbar “Launch installed file”. Select from the FilePicker dialog the 'Sample.exe' file (you included this earlier in your project).
In the command line field pass the string 'foofile'. The effect is that Sample will try to open this file. If 'foofile' doesn't exist on the target machine, Sample will ask the user whether it should create a new one. This is how the command line arguments behave.
For more information please see the page. Install and control services In this step, we will define the services to be installed with your application. You can only install services that are part of your package. First, use the “Files and Folders” option to add the service file (a native Windows service) to your project.
Go to the “Services” page in the left pane. Click on the New service toolbar button. Select the service file from the dialog that appears and fill the service properties fields as in the screenshot below. You can control your service or any other service installed on the target machine during installation. The above operations installed both the service and the service control. The following screenshot shows you exactly the control service operation parameters. For more information about this please see the page and the tutorial.
Add merge modules to your project Let's suppose you install an application that requires Microsoft C Runtime Library. The logic and files that compose this library already exist in the merge module.
You can include this module in your package and it will be installed with your application. This way, you are sure your application will work on every machine. With Advanced Installer it is very easy to add a merge module to your package. Choose “Merge Modules” in the left pane.
Click on the Add merge module toolbar button and browse to your msm file. For more information please see the page.