The following article uses options that are available starting with the Architect edition and project type.
This tutorial will guide you step by step through the creation and customization of an Advanced Installer Architect project that builds a ThinApp virtualized application.
Let's suppose you want to virtualize an application you have created. For this purpose, we will use this sample application. This sample application has some characteristics:
- For the editor to function properly, some registry keys must be present on the target system.
- It has a specific file type associated, called EDI.
Start Advanced Installer by selecting it from the “Start” menu. Launching Advanced Installer automatically starts a new installation project. Choose “Installer” > “Architect” as the project type.
A good idea is to save and name the project at this point. Use the “Save” menu item under the “File” menu or the Ctrl+S keyboard shortcut and let's name it thinapp.aip.
The next step is to add the files and/or folders that compose your application to the project. 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.
Click on thetoolbar button and select your application's files. For this example choose our "Hello, world!" sample application. Repeat this step to include the Foo.edi file you have created. This way you can add as many files as you want.
Once the files are added, their name will appear in the right-side pane. Now let's make a shortcut to the "sample.exe" file you just added. Right click on this file and choose “New Shortcut...”. In the newly appeared dialog, choose a name for your shortcut and a location - like in the following screen-shot. Press the OK button and the shortcut will appear listed in the application shortcut folder.
For more information please see the Files and Folders page.
Let's suppose 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 your application's current settings. On install, it has the value "0x36".
Select the “Registry” page.
In the tree, select the "Software\[Manufacturer]\[ProductName]" key.
Click on thetoolbar button to create a key. Edit the key name to "Settings".
Add a value for it using thetoolbar button.
In the "Name" text field enter the name of your first key: "AppPath". Use the Formatted Type text field, the value that it contains will be expanded at install time into the full path to your application's location.button and select "Application Folder". Since "Data" is a
Use the same steps to create the "AppSettings" value. This time just type in the "Data" field the text "0x36" and select the "Binary" type.
Once the registry keys and values are added, you can see them in the view's right-side pane.
For more information please see the Registry page.
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” from the “Resources” options group.
Use thetoolbar button to create a new extension: "edi". In the appropriate field in the right-side pane, enter a description for this extension. 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. For this example, you should leave the default settings. The effect is 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.
You can add as many verbs as you want for an extension.
For more information please see the File Associations page.
Now that you have added resources to your project, it is time to configure your project to create a ThinApp package containing these resources.
Choose “Build” from the “Package Definition” options group.
Use thetoolbar button to create a new build of type ThinApp. For this tutorial you can leave the default values.
You are now ready to test your program. Right-click the ThinApp build in left tree and selectfrom context menu. This will build your virtualized application.
Now open the build's output folder. You will see the following files: "sample.exe" and a .DAT file. Copy the two files on any system and run the .EXE file. Your application will run virtualized.
This concludes our tutorial.