Is it possible to run this VBS from a command line and
use an Array of values in a cycle?

=========================================
SitesList = Array("1", "2", "3")

For idx = lbound(SitesList) to Ubound(SitesList)
MakeWebSite.vbs -p " & SitesList (IX) & "..........ect
next
=========================================


This is tipically in VBScript format...can I write in DOS and put it in a
.BAT file to run?

Any help much appreciated.

Regards

--
Fabrizio Maccarrone
--
YAMSSQLU
(Yet Another MSSQL User)

Re: How can I do this? by McKirahan

McKirahan
Mon Dec 29 06:58:52 CST 2003

"Fabrizio Maccarrone" <fabrizio (at) 7mates (punto) com> wrote in message
news:e7dYUngzDHA.2408@tk2msftngp13.phx.gbl...
> Is it possible to run this VBS from a command line and
> use an Array of values in a cycle?
>
> =========================================
> SitesList = Array("1", "2", "3")
>
> For idx = lbound(SitesList) to Ubound(SitesList)
> MakeWebSite.vbs -p " & SitesList (IX) & "..........ect
> next
> =========================================
>
>
> This is tipically in VBScript format...can I write in DOS and put it in a
> .BAT file to run?
>
> Any help much appreciated.
>
> Regards
>
> --
> Fabrizio Maccarrone
> --
> YAMSSQLU
> (Yet Another MSSQL User)


Shouldn't "(IX)" be "(idx)"? Also, what does "-p" do?

I'm not sure what you're trying to do but yes, you can execute a script from
a batch file by invoking it with "cscript.exe".

For example, save your VBS code as "MakeWebSites.vbs" and create a batch
file called "MakeWebSites.bat" which contains the line:

cscript.exe //nologo MakeWebSites.vbs