使用批处理文件来创建从IIS配置文件虚拟目录 [英] Using batch file to create IIS Virtual Directory from config file

查看:558
本文介绍了使用批处理文件来创建从IIS配置文件虚拟目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个自动部署脚本,需要创建从中创建配置文件的IIS虚拟目录,当你用鼠标右键单击虚拟目录,选择所有任务>配置保存到一个文件

I am creating an automatic deployment script and need to create an IIS Virtual Directory from the configuration file which is created when you Right-Click the virtual directory and select "All Tasks > Save Configuration to a File"

我已经做了一些阅读和知道有包含在Microsoft Windows服务器名为Iisvdir.vbs将,但是这似乎并没有把这个配置文件作为参数,所以你的一切,以填补自己。一个脚本

I have done some reading and know there is a script included with Microsoft Windows Server called "IISVDIR.VBS" but this doesn't seem to take this configuration file as an argument, so you have to fill in everything yourself.

我知道你可以从这个配置文件中创建一个虚拟目录的唯一方法是,选择新建>虚拟目录(从文件)......

The only way I know that you can create a Virtual Directory from this configuration file is to select "New > Virtual Directory (from file)...".

有谁知道,如果它是可以自动完成?

Does anyone know if it is possible to automate this?

推荐答案

要使用Iisvdir.vbs将需要把它作为参数传递给CSCRIPT.EXE其还预装了Windows服务器。我有其使用的唯一的例子是使用/删除开关删除虚拟目录,但是我敢肯定,你可以以类似的方式添加。

To use IISVDIR.VBS you need to pass it as an argument to cscript.exe which also comes with Windows Server. The only example I have of its usage is to delete a virtual directory using the /delete switch, however I'm sure you can add in a similar way.

这篇关于使用批处理文件来创建从IIS配置文件虚拟目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆