Export (0) Print
Expand All

Running Setup from the Command Line

SQL Server 2000

Notification Services Setup uses Microsoft Windows® Installer, which supports installation from the command line. Using the command-line syntax, you can create a batch file for unattended installation and removal of Notification Services.

Important  If you install or uninstall Notification Services in silent mode from the command line, look in the application log to determine whether the operation was successful.

The downloaded installation file is a self-extracting installation file, MicrosoftSQLServerNotificationServices.exe, that contains a setup bootstrap file (Setup.exe), a Windows Installer database (Microsoft SQL Server Notification Services.msi) and a .cab file (Data1.cab). Running MicrosoftSQLServerNotificationServices.exe automatically runs Setup.exe.

Command-line arguments are passed to Setup.exe or Windows Installer by passing them directly to MicrosoftSQLServerNotificationServices.exe.

Command-Line Arguments for MicrosoftSQLServerNotificationServices.exe

MicrosoftSQLServerNotificationServices.exe accepts the command-line arguments that are presented in the following table.

Argument Description
-s Extracts the compressed file in silent mode (no dialog boxes). MicrosoftSQLServerNotificationServices.exe suppresses the progress indicator that is otherwise displayed while its contents are expanded to a temporary location.
-f path Specifies a location to store Setup.exe, Microsoft SQL Server Notification Services.msi, and Data1.cab when they are expanded.
-e Extracts the setup files without running Setup.

To expand the contents of MicrosoftSQLServerNotificationServices.exe without launching Setup.exe, specify this option without any arguments.

-a setup_arguments Passes the remaining arguments to Setup.exe.
Command-Line Arguments for Setup.exe

Setup.exe supports the command-line arguments that are presented in the following table. These areguments are passed in from the MicrosoftSQLServerNotificationServices.exe -a argument.

Argument Description
-s Runs Setup.exe in silent mode (no dialog boxes).
-vmsi_arguments Passes msi_arguments to Notification Services.msi; do not include a space between -v and msi_arguments. If specifying multiple arguments, enclose msi_arguments in quotation marks.
-x Uninstalls Notification Services.
Command-Line Arguments for Microsoft SQL Server Notification Services.msi

Microsoft SQL Server Notification Services.msi accepts the following command-line arguments, which are passed in from the Setup.exe -v argument.

Argument Description
-q[n|b|r|f] Sets user interface (UI) level:

n = no UI

b = basic UI (progress only, no prompts)

r = reduced UI (dialog at the end of installation)

f = full UI

-L Specifies log file options. To log all messages to log_file_name, use -L*v log_file_name. To log error messages only, use -Le log_file_name.
ADDLOCAL=components|
REMOVE=components|
REINSTALL=components
Specifies one of these options to install (ADDLOCAL), remove (REMOVE), or reinstall (REINSTALL) one or more components.

You can either specify ALL to install or remove all components, or you can use a comma-separated list of components. A list of component names appears below.

INSTALLDIR=path Installs Notification Services to the location specified by path.
SQLSERVERNAME=sql_server_instance_name If you install the database components, specify the SQL Server instance name using this argument. Specify a default instance using only the computer name. Specify a named instance using the computer\instance format. If you do not use this argument, the database components are installed to the default instance.
SQLUSERNAME=sysadmin_user_name To install the database components using SQL Server Authentication, specify the user name of a SQL Server system administrator using this argument.
SQLPASSWORD=sysadmin_password Specify the password of the user name specified with SQLUSERNAME.
ALLUSERS=1 To make the Notification Services Start menu items available to all users, use this argument. If you do not use this argument, Notification Services Start menu items are available only for the account that installs Notification Services.

For more information about these and additional command-line options, see Windows Installer Command Line Options in the Microsoft MSDN® Library.

Component Names

Each component that can be installed from Notification Services Setup can also be installed from the command line using the ADDLOCAL argument for Microsoft Windows Installer. To install a component from a command prompt, you must use the correct command-line name. The full name and command-line name for each component is shown in the following table.

Full Name Command-Line Name
Engine components EngineComponents
Client components ClientComponents
Microsoft SQLXML bulk loader components BulkEvents
Database components DBComponents
Documentation Documentation
Sample applications Samples
All components ALL (default value)

Note  The BulkEvents option, if specified without ClientComponents, installs the client components. ClientComponents, if specified without BulkEvents, installs the SQLXML bulk loader components if the prerequisite software is already installed.

If you specify BulkEvents when the SQLXML and SQL Server client tools are not installed, Setup fails. If you were running Setup in silent mode (no dialogs), Setup writes a message to the application log.
Interaction Between Setup Components

If you run Setup from the command line using MicrosoftSQLServerNotificationServices.exe, you can pass arguments from MicrosoftSQLServerNotificationServices.exe to Microsoft SQL Server Notification Services.msi using Setup.exe. For example, you can run the following command:

MicrosoftSQLServerNotificationServices.exe -s -a -s -v"/qn"

The first -s argument extracts the files without displaying the setup screens. The -a argument passes all following arguments to Setup.exe. The second -s argument runs Setup.exe in silent mode. The last argument, -v, passes the /qn parameter to Microsoft Windows Installer, which runs the .msi package in silent mode.

The following table shows the parameters supplied to MicrosoftSQLServerNotificationServices.exe and the arguments passed to other Setup files.

File Supplied or Passed Parameters
MicrosoftSQLServerNotificationServices.exe -s -a -s -v"/qn"
Setup.exe -s -v"/qn"
Windows Installer /qn
Examples

The following examples show how to run Setup from the command line.

Extracting files to C:\Temp without running Setup

This example shows how to extract the Setup files, Setup.exe, Microsoft SQL Server Notification Services.msi, and Data1.cab, to C:\Temp without running Setup:

MicrosoftSQLServerNotificationServices.exe –f C:\Temp -e

Installing all components using Windows Authentication

This example shows how to install all components of Notification Services using Windows Authentication to install the database components to the default instance of SQL Server:

MicrosoftSQLServerNotificationServices.exe -s -a -s -v"/qn"

Installing all components using SQL Server Authentication

This example shows how to install all components of Notification Services using SQL Server Authentication to install the database components to the default instance of SQL Server:

MicrosoftSQLServerNotificationServices.exe -s -a -s 
   -v"/qn SQLUSERNAME=user_name SQLPASSWORD=password"

Installing all components to a named instance of SQL Server using Windows Authentication

This example shows how to install all components of Notification Services using Windows Authentication to install the database components to a named instance of SQL Server:

MicrosoftSQLServerNotificationServices -s -a -s 
   -v"/qn SQLSERVERNAME=computer\sql_instance"

Installing engine components to a specified location and installing database components to a named instance of SQL Server using Windows Authentication

This example shows how to install the engine components to C:\NS\ and the database components to a named instance of SQL Server using Windows Authentication:

MicrosoftSQLServerNotificationServices -s -a -s 
   -v"/qn ADDLOCAL=EngineComponents,DBComponents 
   SQLSERVERNAME=computer\sql_instance INSTALLDIR=\"c:\NS\""

Removing all installed components using Windows Authentication

This example shows how to remove all installed components:

MicrosoftSQLServerNotificationServices.exe -s -a -x -v"/qn"

Removing database components using Windows Authentication

This example shows how to remove the database components from a named instance of SQL Server using Windows Authentication:

MicrosoftSQLServerNotificationServices.exe -s -a -s 
   -v"/qn REMOVE=DBComponents SQLSERVERNAME=computer\sql_instance"

Removing database components using SQL Server Authentication

This example shows how to remove the database components using SQL Server Authentication:

MicrosoftSQLServerNotificationServices.exe -s -a -s 
   -v"/qn REMOVE=DBComponents SQLSERVERNAME=computer\sql_instance
  SQLUSERNAME=user_name SQLPASSWORD=password"

See Also

Installing Components

Setup Options

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft