Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to modify the settings of IIS Metabase with VBS

2025-03-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "how to use VBS to modify the setting of IIS Metabase". In daily operation, I believe many people have doubts about how to use VBS to modify the setting of IIS Metabase. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubt of "how to use VBS to modify the setting of IIS Metabase". Next, please follow the editor to study!

Test environment: Windows 2000 Server (with IIS service installed)

Required documents:

1. Cscript.exe

2. Adsutil.vbs (this file is under C:\ Inetpub\ AdminScripts)

A subdirectory of IIS has been created under the target directory

Application in InstallShield:

#

LaunchAppAndWait (SUPPORTDIR ^ "vdir.bat", szVdir + "\" + szTarget + "\")

#

# szVdir is the virtual directory name

# szTarget is the directory folder name C:\ inetpub\ wwwroot\ iis

We implement these functions through a bat.

Details of vdir.bat:

# BEGIN###

Echo off

Set vdir=%1

Set vpath=%2

Chdir% vpath%\ iis

Rem cd Inetpub\ Adminscripts

Cscript adsutil.vbs delete w3svcplash 1Accord rootpool% vdir% # Delete an existing virtual directory

Cscript adsutil.vbs create_vdir w3svcqqq1Accord rootRot% vdir% # create a virtual directory

Cscript adsutil.vbs set w3svc/1/root/%vdir%/path% vpath% # home directory path

Cscript adsutil.vbs set w3svc/1/root/%vdir%/DefaultDoc "login.asp" # default document

# END###

Adsutil.vbs can also achieve many functions, everyone to explore their own, the following is about the help of adsutil.vbs

=

Usage:

ADSUTIL.VBS CMD [param param]

Note: ADSUTIL only supports the "no switch" option of MDUTIL

Description:

IIS K2 administration utility that enables the manipulation with ADSI parameters

Standard MDUTIL Commands:

Adsutil.vbs GET path-display chosen parameter

Adsutil.vbs SET path value...-assign the new value

Adsutil.vbs ENUM path ["/ P" | "/ A"]-enumerate all parameters for given path

Adsutil.vbs DELETE path-delete given path or parameter

Adsutil.vbs CREATE path [KeyType]-create given path and assigns it the given KeyType

Adsutil.vbs APPCREATEINPROC w3svc/1/root-Create an in-proc application

Adsutil.vbs APPCREATEOUTPROC w3svc/1/root-Create an out-proc application

Adsutil.vbs APPCREATEPOOLPROC w3svcUnip 1Acroot-Create a pooled-proc application

Adsutil.vbs APPDELETE w3svc/1/root-Delete the application if there is one

Adsutil.vbs APPUNLOAD w3svc/1/root-Unload an application from w3svc runtime lookup table.

Adsutil.vbs APPDISABLE w3svc/1/root-Disable an application-appropriate for porting to another machine.

Adsutil.vbs APPENABLE w3svc/1/root-Enable an application-appropriate for importing from another machine.

Adsutil.vbs APPGETSTATUS w3svc/1/root-Get status of the application

New ADSI Options:

/ P-Valid for ENUM only. Enumerates the paths only (no data)

/ A-Valid for ENUM only. Enumerates all data that CAN be set on the node

KeyType-Valide for CREATE only. Assigns the valid KeyType to the path

Extended ADSUTIL Commands:

Adsutil.vbs FIND path-find the paths where a given parameter is set

Adsutil.vbs CREATE_VDIR path-create given path as a Virtual Directory

Adsutil.vbs CREATE_VSERV path-create given path as a Virtual Server

Adsutil.vbs START_SERVER path-starts the given web site

Adsutil.vbs STOP_SERVER path-stops the given web site

Adsutil.vbs PAUSE_SERVER path-pauses the given web site

Adsutil.vbs CONTINUE_SERVER path-continues the given web site

Samples:

Adsutil.vbs GET W3SVC/1/ServerBindings

Adsutil.vbs SET W3SVC/1/ServerBindings ": 81:"

Adsutil.vbs CREATE W3SVC/1/Root/MyVdir "IIsWebVirtualDir"

Adsutil.vbs START_SERVER W3SVC/1

Adsutil.vbs ENUM / P W3SVC

Extended ADSUTIL Commands:

Adsutil.vbs FIND path-find the paths where a given parameter is set

Adsutil.vbs CREATE_VDIR path-create given path as a Virtual Directory

Adsutil.vbs CREATE_VSERV path-create given path as a Virtual Server

Adsutil.vbs START_SERVER path-starts the given web site

Adsutil.vbs STOP_SERVER path-stops the given web site

Adsutil.vbs PAUSE_SERVER path-pauses the given web site

Adsutil.vbs CONTINUE_SERVER path-continues the given web site

Samples:

Adsutil.vbs GET W3SVC/1/ServerBindings

Adsutil.vbs SET W3SVC/1/ServerBindings ": 81:"

Adsutil.vbs CREATE W3SVC/1/Root/MyVdir "IIsWebVirtualDir"

Adsutil.vbs START_SERVER W3SVC/1

Adsutil.vbs ENUM / P W3SVC

At this point, the study on "how to use VBS to modify the settings of IIS Metabase" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report