Adding Web Service Extension Files
You can use the command-line script iisext.vbs, which is stored in systemroot\system32, to add a single file to the WebSvcExtRestrictionList property of the metabase. The command can be executed on any local or remote computer running Windows.NET with IIS6.0. Web service extension files can be either ISAPI extensions or CGI files.
Iisext.vbs performs the same operations that are available in IIS Manager. You can use either tool to administer IIS Web sites.
Important You must be a member of the Administrators group on the local computer to run scripts and executables, or you must have been delegated the appropriate authority. As a security best practice, log on to your computer using an account that is not in the Administrators group, and then use the Runas command to run your script or executable as an administrator. From the command prompt, type runas /user:administrative_accountname "script or executable command".
This topic contains the following sections:
- Syntax: The order in which you must type a command and any arguments and options that follow it.
- Parameters: The values that are given to variables in the command.
- Examples: Sample code and an explanation of the results.
Syntax
iisext/AddFile Drive:\Path\FileNameAccess {0|1} ID Deletable {0|1} ShortDesc [/s computer [/u [domain\]user**/p**password]]
Parameters
- Drive:\Path\FileName
Required. Specifies the file name and the path of the Web service extension file that is going to be added. - Access
Required. Numerically designates whether the file is disabled (set to 0) or enabled (set to 1) after it is added. - ID
Required. Specifies the ID of the Web service extension that is associated with the file. - Deletable
Required. Numerically designates whether the file can be deleted from the Web service extension restriction list by using iisext or IIS Manager. Set to 0 to prevent the file from being deleted, or set to 1 to allow the file to be deleted. - ShortDesc
Required. A short description of the Web service extension that is associated with the file. This text can be localized, and it should be the same for all of the files that are associated with the same Web service extension. - /sComputer
Runs the script on the specified remote computer. Type the computer name or IP address without backslashes. By default, the script runs on the local computer. - /u [Domain**\**]User
Runs the script with the permissions of the specified user account. This account must be a member of the Administrators group on the remote computer. By default, the script runs with the permissions of the current user of the local computer. - /pPassword
Specifies the password of the user account that is specified in the /u parameter. If you omit this parameter, the script prompts you for the password and obscures the text you type. - /?
Displays Help at the command prompt.
Example 1: Adding a Web service extension file to the local computer
The following command adds the file "Timesheet.exe" to the WebSvcExtRestrictionList property of the metabase on the local computer. The Access flag is set to "0" to disable the file on startup, the ID flag identifies the associated Web service extension as "Payroll", and the Deletable flag is set to "1" to allow the file to be deleted from the list of Web service extensions.
iisext /AddFile c:\Source\Timesheet.exe 0 Payroll 1 Payroll
In response, iisext displays the following:
Connecting to server ...Done. Adding extension file complete.
Example 2: Adding a Web service extension file to a remote computer
The following command adds the file "Payscale.dll" to the WebSvcExtRestrictionList property of the metabase on a remote computer. The Access flag is set to "1" to enable the file on startup, the ID flag identifies the associated Web service extension as "Payroll", and the Deletable flag is set to "0" to prevent the file from being deleted from the list of Web service extensions.
iisext /AddFile c:\Source\Payscale.dll 1 Payroll 0 Payroll /s RemoteComputer /u Manager /p Pa$$Werd
In response, iisext displays the following:
Connecting to server ...Done. Adding extension file complete.
Related Topics
- For information on enabling Web service extension files, see Enabling Web Service Extension Files.
- For information on disabling Web service extension files, see Disabling Web Service Extension Files.
- For information on removing Web service extension files, see Removing Web Service Extension Files.
- For information on listing Web service extension files, see Listing Web Service Extension Files.