Re: How do I pass parameters in a WSH file?



bruce cartland wrote:
> ie. something like
>
> [ScriptFile]
> Path=.\sample.wsf /myarg:mystr

You can't since the syntax above isn't supported and there is no support for
any Args or Arguments variable in a WSH file.

> [Options]
> Timeout=0
> DisplayLogo=0
> BatchMode=0


Create an ordinary *.lnk where you can append script arguments...

If you want to be explicit about the host switches:

//T:0 is the same as TimeOut=0
//T:n is the same as TimeOut=n
//NoLogo is the same as DisplayLogo=0
absence of //NoLogo is the same as DisplayLogo=1
//I is the same BatchMode=0
//B is the same BatchMode=1



--
Michael Harris
Microsoft MVP Scripting




.



Relevant Pages

  • Re: To Vb or not to VB
    ... With this in mind what would be the ... consider VB to be disposable and I would not trust them to support VB.Net ... syntax and re-use many of professional habits. ... you like case-insensitivity for identifiers and many ...
    (microsoft.public.vb.general.discussion)
  • Re: Video Mode 13h in windows XP ... impossible?
    ... at least to my aging eyesight). ... conflict with anything in your syntax, Herbert, or with your eyesight, ... No, seriously, as I've said to Herbert, I think the syntax is actually ... I was saying about adding structure support but _NOT_ using the "dot ...
    (alt.lang.asm)
  • [9fans] Re: 9base ports to unix (flame of byrons rc)
    ... (sorry about the lack of unicode support thorugh this interace. ... -> syntax error ... paul haahr's rc's-lovechild-with-scheme shell es uses ... Byron's shell implements rc-inconform things like `foo as ...
    (comp.os.plan9)
  • Re: Writing single bits to a file
    ... But extending the grammar without ... roots to include support for regular expression literals: ... extending the syntax and grammar in a consistent and intuitive way. ...
    (comp.lang.c)
  • Re: Conditional iteration
    ... Which is, like, step one out of a hundred for getting a syntax change ... into the language. ... It creates syntactical support for two different ways to do something. ... Performance and productivity aren't the same thing. ...
    (comp.lang.python)

Loading