Re: how to Open notepad with a command-line argument
- From: Daz <darren.blackley@xxxxxxxxx>
- Date: Mon, 19 May 2008 07:23:57 -0700 (PDT)
On May 19, 10:12 pm, "ekkehard.horner" <ekkehard.hor...@xxxxxxxx>
wrote:
Daz schrieb:
I would like to keep this as simple as i can and so if I can work with
the format below it would be very helpful. I am very new to VBscript
and am finding my way as i go.
If WScript.Arguments.Named.Exists( "e" ) Then
CreateObject( "WScript.Shell" ).Run "notepad"
Else
WScript.Echo "no no"
End If
Cheers!
As the options you want to work with
<yourscript>.vbs /c:"something else here" /u:"a reference here"
aren't simple boolean (yes/no) switches like in
<yourscript>.vbs /e
you can't just check whether the user entered an option name (e.g. /c) but
you have to read/store/work with the option value (e.g. "something else here").
I C - well basically with both the /c:"something else here" /u:"a
reference here" i want to set a variable if they are used...
Suggestions?
.
- Follow-Ups:
- Re: how to Open notepad with a command-line argument
- From: ekkehard.horner
- Re: how to Open notepad with a command-line argument
- References:
- how to Open notepad with a command-line argument
- From: Daz
- Re: how to Open notepad with a command-line argument
- From: Pegasus \(MVP\)
- Re: how to Open notepad with a command-line argument
- From: Daz
- Re: how to Open notepad with a command-line argument
- From: ekkehard.horner
- Re: how to Open notepad with a command-line argument
- From: Daz
- Re: how to Open notepad with a command-line argument
- From: ekkehard.horner
- Re: how to Open notepad with a command-line argument
- From: Daz
- Re: how to Open notepad with a command-line argument
- From: ekkehard.horner
- how to Open notepad with a command-line argument
- Prev by Date: There is no such object on the server
- Next by Date: Re: "Select * from Win32_Product" Not Finding All Apps
- Previous by thread: Re: how to Open notepad with a command-line argument
- Next by thread: Re: how to Open notepad with a command-line argument
- Index(es):
Relevant Pages
|