Creating X numbers of Applications and Application Pools in iis using a batch script -


i have batch file allow me create application , application pool in iis. works, creates 1 application , application pool.

this current script:

@echo on setlocal enabledelayedexpansion  rem "content source path"  set arg1=%1  rem "content destination path"  set arg2=%2  rem "apps setup"  set arg3=%3  rem split virt names , loop through it. /f "tokens=1* delims=," %%a in (%arg3%) (      set vir=%%a     set pool=!vir!!poolname!      rem create application       %systemroot%\system32\inetsrv\appcmd add app /site.name:"default web site" /path:/!vir! /physicalpath:"%arg2%"      rem create app pool     %systemroot%\system32\inetsrv\appcmd add apppool /name:!pool! /managedpipelinemode:integrated /processmodel.identitytype:applicationpoolidentity /enable32bitapponwin64:false      rem assign app pool application     %systemroot%\system32\inetsrv\appcmd set app /app.name:"default web site/!vir!" /applicationpool:!pool!  ):end endlocal 

install.bat "c:\source" "c:\target" "app1,app2,app3"

please can tell me i'm doing wrong.

thanks.

try call batch:

install.bat "c:\source" "c:\target" app1,app2,app3 

without double quotes surrounding app...
, set args in batch:

set "arg3=%3,%4,%5" 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -