Jump to content

iisweb create using wscript.shell


mark100000

Recommended Posts

Hi i am in the process of attempting to create a little bit of code which will automate the process of adding websites to my iisi am running windows server 2003 with iis 6.0

sy = "cmd /c iisweb /create " & strTemplate & " """ & domainname & """ /d " & domainname & " > c:\ping.txt"			Dim wshell, intReturnset wshell = server.createobject("wscript.shell")wshell.run syset wshell = nothing

Just so you know sy is "cmd /c iisweb /create d:\websites\car-hire-lease.com\ "car-hire-lease.com" /d car-hire-lease.com > c:\ping.txt" Now the code runs without error, there is no error trapping so it would throw an error if the code didn't work. The output file ping.txt is written but there is no content inside. Whereas when i run the 'sy' text on the server through the run application, it runs without problem and the output file contains all the information the server returns.I think it is something to do with permissions, but i can't seem to find which need to be set i set 'read and execute' permissions to cmd.exe, cscript.exe and wscript.exe and iisweb.vbs and still no result.Does anyone have any experience in this matter and might be able to help me out, all advice is most welcome and i thank you in advance

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...