Create an installation disc for an application created using the MapPoint Control

MapPoint North America 2004 SDK

Note  Each computer on which your application is installed must have either a full MapPoint license or a MapPoint run-time license; otherwise, your application's calls to MapPoint will fail.

The following instructions are in three parts:

  • Licensing
  • Modifying the Microsoft Visual Basic 6.0 Package & Deployment Wizard to launch the MapPoint Control Setup
  • Creating an installation disc

To license your users

  1. Purchase run-time licenses for MapPoint for recipients of your application.
  2. Create your application and compile it.
  3. Create the Setup file for your compiled application, making sure that it calls the MapPoint setup.exe.

To modify the Microsoft Visual Basic 6.0 Package & Deployment Wizard to launch the MapPoint Control Setup

To use the Visual Basic Package & Deployment Wizard to have your Setup file call the MapPoint setup.exe. (This assumes that you are using Microsoft Visual Basic 6.0 with service pack 5)

  1. Create a backup of the PDWizard folder before making any changes.
  2. Open setup1.vbp that was installed with Visual Basic from the Wizards\PDWizard\Setup1 folder.
  3. Add the following code to the Form_Load event of setup1.frm after the code that installs data access:
    '=======Beginning of call to MapPoint setup.
    Dim zSetupOptions As String
    'Note: Chr(34) represents a quotation mark (").
    zSetupOptions = " USERNAME=" & Chr(34) & "User Name" & Chr(34)
    zSetupOptions = zSetupOptions & " COMPANYNAME=" & Chr(34) & "User Company" & Chr(34)
    zSetupOptions = zSetupOptions & " INSTALLLEVEL=500"
    'Full installation is 500 MB; typical installation is 100 MB.
    zSetupOptions = zSetupOptions & " INSTALLDIR=" & Chr(34) & "C:\Program Files\Microsoft MapPoint" & Chr(34)
    'Installation location.
    zSetupOptions = zSetupOptions & " /qb"
    'Silent installation.
    ShowStaticMessageDialog "Installing MapPoint Control Run-time"
    SyncShell gstrSrcPath & "mpcsetup.exe" & zSetupOptions
    '=======End of call to MapPoint setup

    Note  Your code can also prompt the user to enter setup information such as name, installation location, or the level of installation. You can also include the MapPoint disk space requirements in the calculation of disk requirements for your application. For more information on how to modify setup1.vbp, see the Visual Basic online Help or the Microsoft Developer Network (MSDN) Library.

  4. Save the project and compile it to create setup1.exe, replacing the existing setup1.exe , and then close the project.
  5. Launch the Package & Deployment Wizard for you MapPoint Control-based application.

    Note  The Package & Deployment Wizard does not recognize the MapPoint Control and will prompt you for a dependency (.dep) file, which doesn't exist. Click the check box to ignore the dependencies for the Control, and then on the next screen, clear the option to install the Control.

    The Package & Deployment Wizard uses the setup1.exe you just compiled and creates the following three files: setup.exe, setup.lst, and a CAB file with the name of your project.

To create an installation disc

  1. Copy all files, including subfolders, from your original MapPoint Setup disc to a folder (<New Folder> ) on your computer.
  2. Delete the following files from <New Folder> :

  3. Rename the following file in <New Folder >:

    setup.exe to mpcsetup.exe
  4. Copy setup.ini from the MapPoint\Runtime folder to <New Folder>, and rename it to mpcsetup.ini .
  5. Replace <New Folder>\MapPoint\MSMap\data.msi with the file of the same name from the Runtime folder.
  6. Remove the following folders, along with the files and subfolders within them:

    Runtime from the MapPoint folder
  7. Copy your application Setup files to <New Folder>, including at least setup.exe, setup.lst , and your project's CAB file created by the Package & Deployment Wizard.
  8. Copy any other application files, such as autorun.inf , icons, executable, data, or other utilities or files that you want to include.
  9. Create your application installation disc (such as a CD or DVD) with <New Folder > as the root folder of the disc.

    Note   The root folder must include your application setup.exe and the MapPoint mpcsetup.exe.

  10. Distribute a copy of the MapPoint Run disc (Disk 2) along with your installation disc, keeping the same volume name and file structure.

    Note   The MapPoint Run disc (Disk 2) contains data that is necessary either for installation or at run-time, depending on the installation option selected.

   You can also deploy your application over a network.

About distributing an application created with the MapPoint Control

Deploy MapPoint over a network