|
The visual studio installer is capable of self-repairing installations, is
fully integrated with W2k and NT 4.0 (if you install the installer!). For simple
things, it isn't hard to use.
Links
- MSI
Documentation -- Who knows how long this link will be valid. Go to the
top level documentation tree for MSDN, then Platform SDK, then Management
Services, then Setup, and then Windows Installer.
- Visual
Studio Installer Home Page - Again, who knows how long. Go to the Visual
C++ home page, then click on Downloads, and scan the list for the
Installer.
- Visual
Studio Installer Documentation -- Again to find this guy go to the MSDN
library home page, then look at Visual Studio 6.0 Documentation, and then Component,
Design, etc., and then Visual Studio Installer.
- Windows Installer Info Site (non-ms)
Getting Started
- You must have Visual Studio Enterprise Edition installed before you can
install the 1.1 installer.
- You use Visual Interdev to create your installers.
- Once you've started InterDev, Create a new Project, and select an Empty
Installer as your project type.
- It is under the Visual Studio folder, and then in Visual
Studio Installer Projects folder.
- Before you go any future fill in the Properties for the installer.
Do this by right-clicking on the project name in the Project Explorer
window (located on the upper right of my screen, at least).
- Next, add the files you want installed. Right click on the Files
icon in the explorer window, and select Add->Files. Select all
that you need. Note that the InterDev doesn't actually import the files at
this point, it just stored relative paths (if it can) to their location.
This is nice because you can put the project files into Visual Source Safe
or cvs and extract them on a second machine and still have the installer
builder work.
- Make sure they get assigned to the proper place in the file tree.
- Do this by double clicking on the File System icon (under the Target
System icon). Open the Application Folder and feel free to
create new folders under it, and add them, etc.
- Application Folder will appear under the Program Files
directories by default.
- Next add short cuts and Registry items as required. When adding a registry
item that needs to refer to a filepath, you can use attributes like [TARGETDIR].
For example, if you needed to refer to the file bogus.exe that was
located in the applications folder, then you would enter [TARGETDIR]bogus.exe.
Note the lack of a "\"!
- Adding COM objects (dll or exes) is a bit more tricky, and is left as an
exercise for the reader (hint, I think you use the Associates to do it).
Check out the Online Help for more help. :-)
As an example, I've got a zip file
here of an installer project that installs a utility that will convert a PDF
file to a Palm DOC file (so it is readable on a Palm or Visor handheld). It adds
a new command to PDF files (assumes that Acro is already installed!). It is
really simple!!
Notes
- Installing a WSC in a real pain in the butt. Usually, you want to run the
regsvr32 utility. While this is possible from most full blown installers
(using a Custom Action) the Visual Studio Installer 1.1 does not seem
to support them (as far as I can tell). In short, you are forced to write
the registry entries yourself. This is painful, but totally possible. For an
example, look at the Visual Source Safe database we maintain here at UW, in
the VSS Utils project. It installs a few WSC components, some stuff
in the Programs Menu (even a help file, ack!). This is the most
sophisticated installer I've written to date.
|