INF: Customizing SQL/MSDE Unattended Installation Files

ID: Q233312


The information in this article applies to:


SUMMARY

An unattended (or silent) installation of SQL Server 7.0 or MSDE 1.0 can be automated by using an .iss file that records the responses and selections that would be provided by a user during an interactive installation.

If you are using SQL Server 7.0, you can generate a custom .iss file that meets your needs by running the SQL Server Setup (SETUPSQL.EXE) on a computer that does not have SQL Server or MSDE installed. You select the options that you want for your .iss file for installing SQL Server. After the install, setup creates a file named Setup.iss in the Windows root directory (for example, C:\WINNT or C:\WINDOWS). You can rename or move the .iss file to a new location and use it to automate future installs in which the same configuration is desired. The optional Setupsql.exe command line parameter "k=Rc" causes Setup to write to the Setup.iss file as you select the options rather than waiting until after the files are copied, thus allowing you to generate an .iss file without actually installing SQL Server. However, the Setup.iss file created with the k=Rc option is incomplete. You must modify the file created using this option as detailed in the SQL Server 7.0 Books Online article "Creating a Setup Initialization File" before it will be usable. SQL Server Books Online is available for download from the following:

http://support.microsoft.com/support/sql/
The option to generate a new .iss file is not available for the MSDE redistributable package, which does not include a graphical setup wizard. However, the same effect can be achieved by modifying an existing .iss file. Sample .iss files that have been tested are available with both MSDE and SQL Server. The file Unattend.iss automates a typical install of MSDE, and the SQL Server CD includes sample .iss files for the installation of common variations of SQL Server installs (client utilities only, Desktop edition/Standard edition, and so forth).

Configuration information of the following installation options follows:

Much of the information in this article can also be found in the SQL Server Books Online article "Creating a Setup Initialization File". For information on how to use an .iss file to automate an installation, see the SQL Server 7.0 Books Online articles "Unattended Installation" and "How to run an unattended installation (Command Prompt)". For MSDE, the command line parameters that specify the location of your .iss file can be found in the MSDE Readme.txt file. For information on how to determine whether a silent installation is complete and whether it succeeded or failed, see the following article in the Microsoft Knowledge Base:
Q233337 INF: How to Determine When Unattended SQL 7.0/MSDE 1.0 Setup is Complete


MORE INFORMATION

The .iss file has a structure similar to a standard Windows .ini file. Entries are grouped together under a section, and section names are denoted by square brackets ("[" and "]"). For example, the following is the first section in the .iss file:


  [InstallShield Silent]
  Version=v5.00.000
  File=Response File 
In this case, the section name is InstallShield Silent and the section contains two entries, "Version" and "File". For information about reading from and writing to INI files from Visual Basic programs, see the following article in the Microsoft Knowledge Base:
Q145647 FAQ: APIs and DLLs in Visual Basic 4.0


Installation Path


    [SetupTypeSQL-0]
    szDir=C:\MSSQL7
    szDataDir=C:\MSSQL7
 
There are two installation directories for SQL Server or MSDE. The root directory specifies the location of the binaries and log files. The data directory specifies the location of database files for the master, msdb, pubs (SQL Server only), and model databases. It is also the default location for new user databases. Modify the szDir parameter to change the root directory, and modify szDataDir to change the data directory. By default these directories will be the same. If these directories are on NTFS partitions, both the user that will be installing MSDE and the Windows NT account that you select as the SQL Server/MSDE service startup account (see the Service Startup Account section below) must have Full Control permissions on them. Setup fails if the required permissions are not available.

Server-Side Network Libraries


    [DlgServerNetwork-0]
    NetworkLibs=4095
    TCPPort=1433
    TCPPrxy=Default
    NMPPipeName=\\.\pipe\sql\query
 
The following network libraries can be included: Named Pipes, TCP/IP sockets, Multi-Protocol, NWLink IPX/SPX, AppleTalk ADSP, and Banyan Vines. The Named Pipes and Banyan Vines server-side Net-Libraries cannot be installed on Windows 95 or Windows 98.

NOTE: For other restrictions that apply to SQL Server/MSDE when running on Windows 95 or Windows 98, see the SQL Server Books Online article "SQL Server 7.0 on Windows 95/98". The .iss entry NetworkLibs is a bitmask that represents the netlibs to install. The values in the bitmask for each network library are below (values are provided in hexadecimal and decimal):

Netlib Value (Hex) Value (Decimal)
Name Pipes 0x0000000F 15
TCP/IP Sockets 0x000000F0 240
Multiprotocol 0x00000F00 3840
NWLink IPX/SPX 0x0000F000 61440
AppleTalk 0x000F0000 983040
Banyan Vines 0x00F00000 15728640
Multiprotocol encryption 0xF0000000 -268435456

To specify which server-side netlibs to install, combine the hexadecimal values with bitwise OR operations and write out this value to the NetworkLibs entry as a 32-bit signed integer. For example, suppose you want to install Named Pipes and Multiprotocol and you want to enable Multiprotocol encryption (Multiprotocol encryption does not have any effect unless Multiprotocol is also included). You would use the hex value F0000F0F, which is -268431601 when represented as a 32-bit signed integer:


       0000000F   (Named Pipes)
    OR 00000F00   (Multiprotocol)
    OR F0000000   (Multiprotocol encryption)
    -----------
       F0000F0F  =  -268431601
   

Alternatively, use the following method:
Add up the values in the "Value (Decimal)" column in the above chart for the network libraries you want to include. For example, to include Named Pipes, Multiprotocol, and Multiprotocol encryption:


               15   (Named Pipes)
    +        3840   (Multiprotocol)
    +  -268435456   (Multiprotocol encryption)
    -------------
       -268431601
   

NOTE: You should always include Named Pipes, unless you are installing on Windows 95 or Windows 98.

The NMPPipeName entry is the named pipe name on which SQL Server listens. It should not be changed from the default ("\\.\pipe\sql\query") without justification.

The TCPPort entry specifies the TCP/IP port number, used when TCP/IP Sockets is installed. It should generally not be changed from the default of 1433.

The entry TCPPrxy is the remote WinSock proxy address, which also only applies when TCP/IP is configured. In most cases it will be "Default".

The NWLinkObj entry is the Novell Bindery service name. This entry only exists when NWLink IPX/SPX is included.

The BanyanObj entry is the StreetTalk service name. It is only used when Banyan Vines is selected.

The ApplObj entry is the AppleTalk service object. It is only used when the AppleTalk ADSP netlib is selected.

Code page, Sort Order, Unicode Collation and Comparison Style


    [DlgCpSortUnicode-0]
    SortId=52
    LCID=1033
    CompStyle=196609
 
The SortID entry identifies both the code page and sort order of the SQL Server/MSDE. In most circumstances the default SortID of 52 (this specifies code page 1252 and a Dictionary order, case-insensitive sort order) should be used. Each code page (also referred to as a character set) has a set of supported sort orders associated with it. Each sort order is identified by a Sort Order ID; a Sort Order ID also uniquely identifies the code page that the sort order is associated with. For a list of alternate Sort Order IDs (and the associated character sets), see the SQL Server 7.0 Books Online article "Sort Order IDs". For additional general information on this topic, see the Books Online article "Code Pages and Sort Orders".

The locale ID entry (LCID) specifies a Unicode collation. A Unicode collation defines the way that Unicode data is sorted (this is similar in function to a sort order for character data). In general, the default locale ID of 1033 (General Unicode) should be used. If you require an alternate sorting of Unicode data, see the Books Online article "Unicode Collation".

Sorting of Unicode characters within a Unicode collation can be adjusted by modifying the Unicode comparison style. Generally you should accept the default value of 196609. The Unicode comparison style is represented by the CompStyle entry, a bitmap with the following components:

Style Value (Hex) Value (Decimal)
Ignore case 0x00001 1
Ignore accent 0x00002 2
Ignore Kana 0x10000 65536
Ignore width 0x20000 131072


The CompStyle values can be calculated similarly to the NetworkLibs bitmask (discussed in the preceding Server-side Network Libraries section). For example, the default of 196609 (0x30001 in hexadecimal) is the result of combining the Ignore case, Ignore Kana, and Ignore width options:


           1   (Ignore case)
    +  65536   (Ignore Kana)
    + 131072   (Ignore width)
    ---------
      196609
   


Licensing


    [License]
    License Mode=PERSERVER
    License Limit=15
 
The License Mode entry has the following possible values: "PERSERVER", and "PERSEAT". The License Limit entry specifies the number of per server SQL Client Access Licenses (CALs) that have been purchased. The License Limit entry does not exist when License Mode is PERSEAT.

The [License] section does not apply to MSDE or SQL Server Desktop edition installs; client connections to SQL Server Desktop edition or MSDE do not require SQL CALs. However, the computer that SQL Server Desktop is installed on must be covered by a per seat SQL CAL. Similarly, a computer with MSDE installed requires a per seat SQL CAL if MSDE will be interacting with a SQL Server. For additional information on SQL Server Desktop edition licensing, see the SQL Server license agreement and the following Microsoft Knowledge Base article:
Q207809 INF: DTS/Replication Licensing for Desktop SQL Server 7.0


Registered User Name


    [SdRegisterUser-0]
    szName=User Name
    szCompany=Company Name
 
The installation of MSDE or SQL Server can be customized with the name of the registered user and company name. Modify szName to change the user's name, and szCompany to include the company.

Service Startup Accounts


    [DlgServices-0]
    Local-Domain=61680
    AutoStart=255
    SQLDomain=MyDomainName
    SQLDomainAcct=MyDomainUser
    SQLDomainPwd=....
    AgtDomain=MyDomainName
    AgtDomainAcct=MyDomainUser
    AgtDomainPwd=....
 
The [DlgServices-0] section defines the properties of the accounts under which the MSSQLServer and SQLServerAgent services run. The Local-Domain entry is a bitmap that specifies whether each of these accounts is a Windows NT domain account or is the special LocalSystem account. For information on when a domain account should be used instead of the local system account, see the SQL Server Books Online articles "Creating SQL Server Services User Accounts" and "SQLServerAgent Service Startup Account". On Windows 95 or Windows 98, the services must be installed to use the LocalSystem account; these operating systems do not provide a service control manager, so both services run under the security context of the current interactive user. The options for the Local-Domain entry are:

Option Value (Hex) Value (Decimal)
MSSQLServer uses LocalSystem 0x000F 15
MSSQLServer uses domain account 0x00F0 240
SQLServerAgent uses LocalSystem 0x0F00 3840
SQLServerAgent uses domain account 0xF000 61440


In the preceding example section [DlgServices-0], Local-Domain is 61680, which indicates that both the MSSQLServer and SQLServerAgent will be started under a domain account (61440 + 240 = 61680).

The AutoStart entry is a bitmask that controls whether each service is configured to autostart when the computer starts (on Windows NT) or when a user logs on (on either Windows 95 or Windows 98). Note that SQLServerAgent cannot be configured to AutoStart on Windows 95 or Windows 98, although MSSQLServer can. On Windows NT, you can autostart SQLServerAgent only if you autostart MSSQLServer as well, since the SQLServerAgent service is dependent on MSSQLServer. In the previous example, both MSSQLServer and SQLServerAgent are configured to AutoStart (240 + 15 = 255):

Option Value (Hex) Value (Decimal)
MSSQLServer autostarts 0x000F 15
SQLServerAgent autostarts 0x00F0 240


For additional information about starting MSSQLServer or SQLServerAgent on Windows 95 or Windows 98, see the following article in the Microsoft Knowledge Base:
Q196654 INF: How to Control the SQL Server Services on Windows 95/98
The remaining entries in this section (SQLDomain, SQLDomainAcct, SQLDomainPwd, and so forth) specify which Windows NT account(s) will be used if the Local-Domain entry indicates that one or both services will use a Windows NT domain account instead of the LocalSystem account. These entries are not present when LocalSystem is being used for both services. The password entries are encrypted, and can only be obtained by running SQL Server Setup interactively to generate a new .iss file. If this is not possible or practical in your circumstances, you must install MSSQLServer and SQLServerAgent to run under the LocalSystem account (Local-Domain=3855). Windows NT users can later change the service startup accounts, if desired (see the SQL Server Books Online articles "How to set up a SQL Server service to log on under a different user account (Windows NT)" and "Creating SQL Server Services User Accounts").

Additional query words:


Keywords          : SSrvInst kbSQLServ700 
Version           : WINDOWS:1.0; winnt:7.0
Platform          : WINDOWS winnt 
Issue type        : kbinfo 

Last Reviewed: August 2, 1999