SQL Server 2000 Desktop Engine Setup

Distributing SQL Server with Applications

Distributing SQL Server Applications

SQL Server 2000 Desktop Engine Setup

The Microsoft® SQL Server™ 2000 Desktop Engine includes a Setup.exe file that an application setup process can use to install the SQL Server 2000 Desktop Engine. You can define settings for customizing the way Setup.exe installs SQL Server 2000 Desktop Engine. These settings can be specified through either command prompt switches or an .ini file.

Syntax

setup [/?]

   [

      [   /i package_file

          [ /settings ini_file ]

          |   [   [ TARGETDIR="executable_folder_path"]

                   [ DATADIR="data_folder_path" ]

                   [ INSTANCENAME="instance_name" ]

                   [ COLLATION="collation_name" ]

                   [ CALLBACK=Dllname!CallbackFunctionName ]

                   [ USEDEFAULTSAPWD | SAPASSWORD="sa_password" ]

              ]

      ]

      | [ /x package_file ]

   ]

   [ /L*v [filename] ]

   [ /qn | /qb ]

Arguments

/?

Displays a syntax summary of the setup switches. setup displays more switches than it accepts; use only the switches documented in this topic.

/i package_file

Specifies the name of the Windows Installer installation package file (an .msi file) to be used to install an instance of the SQL Server 2000 Desktop Engine. Place the .msi file in the same folder as setup.exe. If /i is not specified, copy all 16 of the .msi files from the \Sqlmsde\Setup folder on the SQL Server 2000 compact disc to the same folder as Setup.exe.

settings ini_file_name

Specifies the name of an .ini file containing settings for TARGETDIR, DATADIR, INSTANCENAME, COLLATION, USEDEFAULTSAPWD, and SAPASSWORD. If /settings is specified, these options should be set in the .ini file, not in the command prompt switches. Place the .ini file in the same folder as setup.exe.

TARGETDIR="executable_folder_path"

Specifies the folder where the Desktop Engine executable files are installed. The default for executable_folder_path is C:\Program Files\Microsoft SQL Server.

DATADIR="data_folder_path"

Specifies the folder where the SQL Server system databases are built. The default is the same folder used for the Desktop Engine executable files.

INSTANCENAME="instance_name"

Specifies the name for the instance. If no instance name is specified, the instance is installed as a default instance.

COLLATION="collation_name"

Specifies the SQL Server collation that will be used as the default collation for this instance of the Desktop Engine. For information about a list of collation names, see Windows Collation Name and SQL Collation Name.

CALLBACK=Dllname!CallbackFunctionName

Specifies the name of the DLL containing the Desktop Engine Windows Installer callback function, and the name of the callback function. For more information, see Desktop Engine Windows Installer Callback Functions.

USEDEFAULTSAPWD

Specifies that setup assign the default password (NULL) to the sa login.

SAPASSWORD="sa_password"

Specifies that setup assign a password to the sa login. When /i is specified, you must specify either /USEDEFAULTSAPWD or /SAPASSWORD, but not both.

/x package_name

Specifies the name of the Windows Installer installation package file (an .msi file) to use when uninstalling an instance of SQL Server 2000 Desktop Engine. You must specify the name of the same installation package file that was used to install the instance of the Desktop Engine. Place the .msi file in the same folder as setup.exe.

/L*v [filename]

Specifies that a verbose log be created. If filename is specified, the log is stored in the file specified.

/qn

Specifies that setup run with no user interface.

/qb

Specifies that setup show only the basic user interface. Only dialog boxes displaying progress information are displayed. Other dialog boxes, such as the dialog box that asks users if they want to restart at the end of the setup process, are not displayed.

Remarks

SQL Server 2000 Desktop Engine Setup is a tool that applications can use to install the SQL Server 2000 Desktop Engine as a part of the typical installation process. It is not intended as a tool for installing the database engine from the SQL Server 2000 compact disc. To install SQL Server 2000 from a compact disc, use the autorun.exe component in the root folder of the SQL Server 2000 compact disc. For more information about installing SQL Server from the compact disc, see Overview of Installing SQL Server 2000.

Applications that do not use Windows Installer as their setup mechanism can use SQL Server 2000 Desktop Engine Setup. Applications that use Windows Installer should instead use the SQL Server 2000 Desktop Engine Merge Modules. For more information about using the merge modules, see SQL Server 2000 Desktop Engine and Windows Installer.

To run SQL Server 2000 Desktop Engine Setup, the application setup process must copy these files to the same folder:

  • Setup.exe from the \Sqlmsde folder on the SQL Server 2000 compact disc.

  • Sqlrun.cab from the \Sqlmsde\Setup folder on the SQL Server 2000 compact disc.

  • Either all of the SqlrunXX.msi installation package files from the \Sqlmsde\Setup folder on the SQL Server 2000 compact disc, or a custom installation package file. For more information, see Managing Desktop Engine Installation Package Files.

  • Optionally, an .ini file with settings for the TARGETDIR, DATADIR, INSTANCE NAME, COLLATION, USEDEFAULTSAPWD, and SAPASSWORD options.

The application then executes setup.exe at the point in the installation process where the Desktop Engine should be installed. The setup process of an application typically will use one of two mechanisms to execute the Desktop Engine Setup:

  • Execute Setup.exe from a batch command file or from the command prompt. When using this method, setup switches are specified in the same way they would be specified for any other command prompt utility.

  • Execute Setup.exe from within the application setup executable file using a method similar to the Win32® CreateProcess() function. In this case, setup switches are specified in a character string passed in using the lpCommandLine paramter. For information about using CreateProcess() to execute Setup.exe, see Desktop Engine Installation Sample.

If neither /qn nor /qb is specified, Setup.exe displays all user interface dialog boxes.

Whenever an application needs to uninstall an instance of the Desktop Engine, it must call the SQL Server 2000 Desktop Engine Setup using the /x switch to specify the same .msi file that was used to install that instance. For example, to uninstall a named instance installed with a custom installation package file named MyCustom.msi, execute:

Setup /x MyCustom.msi
Settings Using an .ini File

Optionally, the TARGETDIR, DATADIR, INSTANCE NAME, COLLATION, USEDEFAULTSAPWD, and SAPASSWORD options can be specified using an .ini file. The first line in the .ini file must contain the string [Options]. The format of the .ini file is shown in this example:

[Options]
TARGETDIR="C:\Program Files\Microsoft SQL Server\Mssql$MyInstance\Binn"
DATADIR="C:\Program Files\Microsoft SQL Server\Mssql$MyInstance\Data"
INSTANCENAME=MyInstance

Note  Settings that contain spaces should be enclosed with quotation marks.

Recommended Settings for TARGETDIR and DATADIR

Because your application is installing an instance of SQL Server 2000, it should typically specify the same default folders that SQL Server 2000 uses for instance installations. You can specify different locations if you want to install the instance in a non-default location.

When installing a default instance, the recommended default settings are:

TARGETDIR="C:\Program Files\Microsoft SQL Server\Mssql\Binn"
DATADIR="C:\Program Files\Microsoft SQL Server\Mssql\Data"

When installing a named instance, the recommended default settings are:

TARGETDIR="C:\Program Files\Microsoft SQL Server\Mssql$MyInstance\Binn"
DATADIR="C:\Program Files\Microsoft SQL Server\Mssql$MyInstance\Data"
INSTANCENAME="MyInstance"