Creating a Self-Extracting Setup Executable File

Visual Studio 6.0

There are two ways to create a distribution unit like a self-extracting setup executable file. You can create an in-place distribution unit as a part of a language-based project, like Visual J++, or you can create a packaging project.

Building the project before packaging is recommended if you are going to select specific .class files to install. If necessary, it also starts the browser and loads an HTML page included in the project.

To create a self-extracting setup executable file as a standalone packaging project

  1. On the File menu, click New Project.

  2. Expand the Visual Studio node. Click Distribution Units.

  3. Click Self-Extracting Setup.

  4. Make any adjustments to the name and location, if needed. Select Close current solution or Add to current solution, as needed.

  5. Click Open.

To create an in-place setup package

  1. In the Project Explorer, select the project, then right-click Project Settings.

  2. In the Project Settings dialog box, click Output Format. Click Enable Packaging, and then from the Packaging Type drop-down control, select Self-Extracting Setup (.EXE).

  3. Click Advanced.

  4. In the Advanced Settings dialog box, you can do any of the following, as needed:
    • Specify the title of the application your setup distribution unit will install on the client machine. This title will appear in the user's Add/Remove Programs dialog box, available from the Windows Control Panel.

    • Set the default installation directory, either as an absolute directory path name or as a path name relative to the Program Files directory.

    • Specify that your setup distribution unit should create a Start menu item from which the user can run your application.
  5. Click Build to build the project. When this is completed, confirm that your setup distribution unit was built in the correct location.

  6. Test the packaged setup file by running it.

    When testing, confirm that your distribution unit installs all of the files you included in it, such as Java .class files, HTML pages, readme files, .gif files, or others.

    Check also to see that your setup distribution unit added your application's name to the Add/Remove Programs dialog box, available from the Windows Control Panel. Once you have finished confirming the success of your installation, you should also launch the uninstaller from the Add/Remove Programs dialog box to check that it correctly removes your application.

You should now have a self-extracting setup distribution unit containing the files you specified, and an uninstaller.