回复 5# xuexinnew
试试这个 test.bat- @echo off
- set "sitePath=%~dp0"
- for /l %%i in (1,1,3) do (
- echo 新建程序池 test%%i
- C:\Windows\System32\inetsrv\appcmd.exe add apppool /name:"test%%i" /managedRuntimeVersion:"v4.0"
- C:\Windows\System32\inetsrv\appcmd.exe stop site "Default Web Site"
- C:\Windows\System32\inetsrv\appcmd.exe add site /name:"test%%i" /bindings:http/*:80: /applicationDefaults.applicationPool:"新程序池" /physicalPath:%sitePath%
- )
- pause
复制代码
|