ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH
advanced | search help

Reference
Perl Dev Kit
Welcome
PerlApp
PerlCtrl
PerlMSI
PerlMSI Overview
PerlMSI Wizard
PerlMSI Installer
PerlMSI MSI
PerlNET
PerlSvc
PerlTray
Coverage and Hotspot Analyzer
Filter Builder
Graphical Debugger
VBScript Converter
Reference

MyASPN >> Reference >> Perl Dev Kit
Perl Dev Kit documentation

PerlMSI - Overview

What is PerlMSI?

PerlMSI is a collection of Perl modules and a wizard script for creating and manipulating Microsoft Installer database (.msi) files using Perl on Windows.

Software Requirements

PerlMSI requires the Microsoft Installer SDK .

Microsoft Installer databases can be deployed on Windows Me, Windows 2000 and Windows XP systems without any additional software. Windows NT and 98 require the following upgrades:

Windows NT
http://download.microsoft.com/download/platformsdk/wininst/1.1/NT4/EN-US/InstMsi.exe

Windows 98
http://download.microsoft.com/download/platformsdk/wininst/1.1/W9X/EN-US/InstMsi.exe

PerlMSI Components

  • PerlMSI Wizard

    A command-line Perl program (msiwiz.pl) for generating a template script, which in turn generates an MSI installation database using MSI::Installer.

  • MSI::Installer

    The Perl module used to create and manipulates the MSI installation databases.

  • PerlMSI API

    PerlMSI reference information.

Configuring PerlMSI

Common customization functions for PerlMSI are described below. See the MSI::Installer documentation for more information on method customization.

Adding Features

Features correspond to the main choices available to a user when installing a product with an MSI installation database. Each feature is associated with one or more components. The association determines what components (files, registry entries, services, etc) need to be installed on the target machine. CreateFeature functions as a wrapper around the AddFeature method.

    $installer->CreateFeature(
        'DOCUMENTATION_FEATURE',                              # FeatureName
        'TOP_FEATURE',                                        # FeatureParent
        '',                                                   # Directory
        'Documentation',                                      # Title
        'OurProduct documentation in Microsoft Help format'', # Description
        '1'                                                   # isExpanded
    );

To associate a component with a feature, use the SetFeatureComponent method from Image.pm.

    $installer->SetComponentFeature(
        '$PRIMARY_FOLDER/ActivePython.chm', # Name
        'DOCUMENTATION_FEATURE',            # Feature
        '1',                                # is_dir
        '1',                                # recurse
    );

Shortcuts

To add a shortcut from the Start Menu, Desktop, or any other folder, use the SetShortcut method to add a record to the Shortcut table.

    $installer->SetShortcut(
        'ProgramMenuFolder/OurCo/Release Notes', # shortcut_path
        'ourco/readme.html',                     # target_file
        '',                                      # arguments
        '',                                      # working_directory
    );

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved