Question : IIS 6 and ASP - How to create new website on IIS 6.0 from ASP page using a batch file.  The file will not execute

Hi,  I'm trying to run a batch file from an ASP page that creates a new website on IIS 6.0.  I want to do this so I can automate website creation for a web hosting site. I'm also going to want to automatically create DNS Forward Zones and records on the DNS server in the same way. If executed directly on the server, the .bat file creates the website with no problem.  There are no errors that come up in the web browser when I open the ASP page in Internet Explorer.  I've given the web server all the permissions I can think of.  I even gave the IISUser account administrative permissions and allowed scripts and executables for the website.  I've allowed all possible extensions on the server.  I've basically made the IIS server a huge security risk.  ....but the file will not execute.  The server does make a "beep" though....from that little annoying internal speaker.  It beeps each time I refresh the ASP page.

Also, I'm not having write problems, I am able to create and write the .bat file dynamically without a problem from an ASP page.  That code is on the same page before this code:

This is my ASP code

<% Dim objShell
      Set objShell = server.CreateObject("wscript.shell")
      objShell.RUN("wscript d:\websites\createsite.bat")
      Set objShell = nothing
%>

This is my .bat file

  iisweb /create d:\websites\thisweb newsite /s SVR2 /b 80  /d www.thisweb.com /u administrator /p PASSWORD

This script works fine if run from the command line or executed from the batch file directly on the server.

Please Help

Thank You
John

Answer : IIS 6 and ASP - How to create new website on IIS 6.0 from ASP page using a batch file.  The file will not execute

PAQed with points refunded (245)

modulo
Community Support Moderator
Random Solutions  
 
programming4us programming4us