Customizing Setup Files

The Setup Wizard will get you started quickly, but it's unlikely to build exactly the Setup project you want to deploy. Fortunately, Visual Studio .NET provides many ways for you to customize a Setup project. You can modify the configuration settings for the Setup project as a whole, or you can use a set of custom editors to modify individual aspects of the project, such as the files installed and the user interface presented.

Configuration Properties

Before deployment, you may modify the configuration settings for your package using the Property window for your project within the Solution Explorer. Figure 13.1 shows this window for a project named SqlSetup.msi .

Figure 13.1. The configuration settings page for project SqlSetup.msi .

graphics/13fig01.jpg

Five primary configuration properties are presented here:

  • Output file name Used to specify the name of the generated installer ( .msi ) package.

  • Package files Used to specify whether the files should be packaged as loose uncompressed files, within the setup file, or as one or more cabinet ( .cab ) files. If multiple cabinet files are allowed, you may specify the maximum size for each to reduce the size of each file that must be downloaded by a user installing the package.

  • Bootstrapper Used to specify whether the installation package should include the capability to install the Windows Installer utility on the client system, if it is not already present, to allow the installation of your application.

  • Compression Used to specify whether your files should be compressed either for size or speed of installation.

  • Authenticode signature Used to specify the file containing an Authenticode digital signature and private key file that will be used during installation.

Setup Editors

You can also customize your Setup project using the Visual Studio .NET IDE editors. Right-click the project in the Solution Explorer and select View. Then, select one of the following editors:

  • File System Editor Specifies the file system configuration that will be used during installation. Within this editor, placeholders such as User's Startup Folder are provided to reflect a mapping to the appropriate locations for the user performing the installation. Some of the available special folders include Application Folder, Common Files Folder, Program Files Folder, User's Desktop, and the System Folder. This editor can be used to configure shortcuts to your application that will be automatically installed along with the application. Figure 13.2 shows this editor in action.

    Figure 13.2. Using the File System Editor.

    graphics/13fig02.jpg

  • Registry Editor Used to specify Registry keys, subkeys, and values that will be added to the Registry of the user's system during installation.

  • File Types Editor Used to specify file type associations, allowing your application to automatically be used to open a file if its type (based on the file extension) matches the associated value.

  • User Interface Editor Used to customize the installation interface to include dialog boxes within the Start, Progress, and End stages of installation. This editor can be used to include Rich-Text Format ( .rtf ) files, such as the license agreement and Readme files mentioned earlier, so that the installation will only continue after the user responds that he has read the details provided. Figure 13.3 shows the User Interface Editor. You can use this editor to select which dialog boxes to show during setup; however, Visual Studio .NET does not allow you to change the design of individual dialog boxes.

    Figure 13.3. Using the User Interface Editor.

    graphics/13fig03.jpg

  • Custom Actions Editor Used to allow the specification of compiled DLL or EXE files to be executed during the Install, Commit, Rollback, and Uninstall phases of installation. These might be used to configure a database for your application or any other type of executable action that is not directly a part of the installation itself. If a custom action fails, the entire installation will be rolled back to the preinstall state.

  • Launch Conditions Editor Used to set conditions that must be met before an installation can begin, such as whether the .NET Framework is already installed and whether a particular Registry key is present. If these condition are not met, installation terminates.

graphics/alert_icon.gif

The Condition property is present on editor elements such as folders, files, Registry keys, custom actions, and launch conditions. If this property does not return a True value, the action is not performed.




Developing and Implementing WindowsR-based Applications with Visual BasicR. NET and Visual StudioR. NET Exam CramT 2 (Exam 70-306)
Developing and Implementing WindowsR-based Applications with Visual BasicR. NET and Visual StudioR. NET Exam CramT 2 (Exam 70-306)
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 188

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net