Customizing the File
files is the hardest argument. Open the File
System item. In the central window you will see a list of folders. Each
folder contains some files, or just some shortcuts.
Windows System Folder contains DLL
libraries or ActiveX components which have to be registered by the installer.
This is the right location for other files that must be placed in Windows
add one or more Windows special folders (ie: Windows, Application Data etc.)
right-click and select Add Special Folder
then select the special folder you need.
type libraries, text documents, images, and all files needed by your
application must reside in the Application
Folder. You can also create sub-folders and add new files there, with just a
VSI reads VB project dependencies, you do not need to add components or system
files in File System, except for
those files that VSI cannot read from the source project (like documents,
can add shortcuts in the User’s Start
Menu and User’s Desktop folders,
with a mouse right-click, just selecting Create
the shortcut destination from the file list. You can also specify some more
features, first of all the shortcut icon. This necessary since VSI gets icons
only for executables, so for other file types you must specify an
the Description property you can add
comments, so that users can see a description when choosing the Property dialog box for an executable. The vbShowCmd
property is similar to the vbNormal,
vbMinimized, vbMaximized VB costants, and sets windows size. In the Arguments property you can specify fixed
parameters and arguments for your executable.
Creating Windows Start
create folders and shortcuts in the Windows Start
Menu, right-click on File System on
Target Machine, and select Add
Special Folder and then Custom.
VSI will create a new sub-folder called NEWFOLDER. Rename
this folder in ProgramMenuFolder.
Write folder name exactly as shown. This is a Windows Installer constant, used
to identify that particular folder. This new folder is the Program Files folder in the Start
you can add a new sub-folder under ProgramMenuFolder
and name it as you like, adding here shortcuts as shown before.
the bottom of the screen you can see the Task
List. Once completed the above operations, select the Build command from the Build
menu. VSI will begin to create the installer. If nothing appears in the task
list it means that the package has been created with no errors.
task list can display simple warnings or critical errors. In the latter case,
you will see the Failed message on the status bar.
very simple but frequent error is to add duplicate filenames in the File System.
are not often important, anyway you should verify the reason why they were
issued. The most frequent warning is about DLL versions. It is possible that
your operating system contains DLLs with different version than those used by
VSI for creating packages. Since VSI uses its own merge modules containing
system and run-time libraries, it will just emit warnings about components with
different versions. You can leave things unchanged, since VSI will not
overwrite later versions of the same components.
warnings can be related to the lack of dependencies for type libraries, dynamic
link libraries or ActiveX components. If you have no dependencies file
(particularly for your own type libraries), you should control the source code,
if possible, and verify that each file required by your component is included
in the package.
example, your application has a reference to a certain type library, but you have
no dependecies file for this component; in this case VSI shows a warning
message, and you must be sure that all the required libraries are included in
the File System, (in this case VSI
cannot rely on dependencies), because otherwise the application will not work
on machines that don't contain components required by the type library. Here's a
sample task list:
Building the Installer
are now ready to build your own package. From the Build menu you have to select the Rebuild command. VSI will create a Windows Installer package; if
you chose Installer with Installer
Loader from the Project Properties window, VSI will copy Windows Installer
redistributables in the package output folder. From the Project menu, choose Launch
Installer to test your package. Before distributing your installer,
remember to set package configuration to Release
from the Project Properties window.
main purpouse of this article is not to be a guide to VSI, rather just a
starting point, since it is quite hard to find documentation about VSI on the
can also download the Windows
Installer SDK from MSDN Web Site, very useful for C++ programmers,
containing sample projects and documentation for Windows Installer
Contact me at my e-mail address: firstname.lastname@example.org
or visit my Italian home page at http://community.visual-basic.it/Alessandro
for more information.