IIS7添加Application脚本代码打包一个简单的操作IIS7 的脚本. 依靠系统自带的Appcmd.exe工具, 进行添加Applicaiton Pool, Application及给Application分配Application Pool的操作. 在文件 Install.bat中, 有一些基本参数设置 Rem CreateAppPool_IIS7.bat appPoolName[required]: Application pool name appPoolVer[required]: Application Pool runtime version, it is v4.0 now. managedPipelineMode: managed Pipeline Mode, Classic or Integrated, it is Classic now autoStart: true or false Rem CreateApp_IIS7.bat appName[required]: the name of the root, "Default Web Site" is the default value path[required]: the application name appPhysicalPath[required]: the physical path of the application, for example, the physical path of pb is "d:wwwrootmyapp" Rem AssignAppPool_IIS7.bat appPath: the path of the application, for example, “Default Web Site/myapp”
警告:运行BAT源码是一种危险的动作,如果你不熟悉,请不要尝试!
展开内容