Applied to: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1
You can add a single file to the WebSvcExtRestrictionList Metabase property by using the command-line script iisext.vbs (stored in systemroot\system32). This command can be performed on a local computer or a remote computer that is running a member of the Windows Server 2003 family with IIS 6.0. The WEB service extension file can be an ISAPI extension or a CGI file.
IisExt.vbs performs the same operations that are available for IIS Manager. You can use either tool to manage an IIS Web site.
Important matters
Only members of the Administrators group on the local computer can run scripts and executables. As a security best practice, log on to the computer using an account that is not part of the Administrators group, and then use the runas command to run scripts and executables as an administrator. At the command prompt, type runas/profile/user:mycomputer\administrator cmd, open a command window with administrator privileges, and then type Cscript.exescriptname (including the full path and any parameters of the script).
This topic includes the following information:
• Syntax: The order in which you type the command and any parameters and options that follow it.
• Parameter: Gives the value of the variable in the command.
• Example: Sample code and a description of the result.
Grammar
Iisext/addfile drive:\path\filename Access {0|1} ID deletable {0|1} shortdesc[/s computer [/u [domain\]user/p Password]]
Parameters
Drive:\path\filename
Required. Specifies the file name and path of the WEB service extension file that you want to add.
Access
Required. A number indicating whether the file is disabled (set to 0) or enabled (set to 1) after the file is added.
Id
Required. Specifies the ID of the WEB service extension associated with the file.
Deletable
Required. A number indicates whether the file can be removed from the WEB service extension limit list by using iisext or IIS Manager. If set to 0, the file is prohibited from being deleted, and if set to 1, the file is allowed to be deleted.
Shortdesc
Required. A brief description of the WEB service extension associated with the file. This text can be localized, and it should be the same as all files associated with the same WEB service extension.
/s Computer
Runs the script on the specified remote computer. Type the name or IP address of the computer without the backslash. By default, the script runs on the local computer.
/u [domain\]user
Runs the script with the permissions of the specified user account. The 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.
/P Password
Specifies the password for the user account specified in the/u parameter. If you omit this argument, the script prompts you to enter a password and does not display the text you typed.
/?
Displays help at the command prompt.
Example
Example 1:
The following command adds the file "Timesheet.exe" to the WebSvcExtRestrictionList property of the metabase on the local computer. Set the Access flag to "0" to disable the file at startup, the ID flag identifies the associated WEB service extension as "Payroll", and the deletable flag to "1" to allow the file to be removed from the Web service Extensions list.
Copy Code code as follows:
Iisext/addfile C:\Source\Timesheet.exe 0 Payroll 1 Payroll
As a response, Iisext displays the following:
Connecting to server ... Done.
Adding extension file complete.
Example 2:
The following command adds the file "Payscale.dll" to the WebSvcExtRestrictionList property of the configuration database on the remote computer. Set the Access flag to "1" to enable the file at startup, the ID flag identifies the associated WEB service extension as "Payroll", and the deletable flag to "0" to prevent the file from being removed from the WEB service Extensions list.
Copy Code code as follows:
Iisext/addfile C:\Source\Payscale.dll 1 Payroll 0 payroll/s remotecomputer/u manager/p pa$ $Werd
As a response, Iisext displays the following:
Connecting to server ... Done.
Adding extension file complete.