Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VBS User input

0 views
Skip to first unread message

Björn Johansson

unread,
Aug 22, 2003, 3:20:30 AM8/22/03
to
inputbox is the solution. http://www.sloppycode.net/vbscript/?m=2583

Checkout http://bjorn.johansson.gs/scripts.html#_BiosInfo if you want an
example of using inputbox value as variable.

--
Björn Johansson, Sweden
http://bjorn.johansson.gs

<duane....@musowls.org> wrote in message
news:02cf01c36821$df163590$a501...@phx.gbl...
> I am looking to implement a prog that allows me to create
> a user in Active Directory. What I want to do is to
> execute the prog with some parameters ( newuser firstname
> lastname) and be able to use those variables. Does vbs
> allow me to do this like *nix scripting or batch files??


Richard Mueller [MVP]

unread,
Aug 22, 2003, 2:53:20 PM8/22/03
to
Or, you can specify parameters on the command line. Then, in the VBScript
program you can access the parameters using the Arguments collection (a zero
based collection). For example:

' Check for required arguments.
If Wscript.Arguments.Count <> 2 Then
Wscript.Echo "Syntax error. Correct syntax is"
Wscript.Echo "cscript MyProgram.vbs FirstName LastName"
Wscript.Quit(0)
End If

strFirstName = Wscript.Arguments(0)
strLastName = Wscript.Arguments(1)

--
Richard
Microsoft MVP Scripting and ADSI
HilltopLab web site - http://www.rlmueller.net
--
"Björn Johansson" <bjornN0@$PAMjohansson.gs> wrote in message
news:eesXf3Ha...@TK2MSFTNGP09.phx.gbl...

0 new messages