From: Saucer Man on
I need to run an .exe with arguments like

this.exe address: 192.168.168.100 logfile: c:\logfile.log


How can I do this?

--
Thanks!


From: Pegasus (MVP) on

"Saucer Man" <saucerman(a)nospam.com> wrote in message
news:4803a5dc$0$19796$cc2e38e6(a)news.uslec.net...
>I need to run an .exe with arguments like
>
> this.exe address: 192.168.168.100 logfile: c:\logfile.log
>
>
> How can I do this?
>
> --
> Thanks!

Your question is a little unclear. Which of the following to
you mean:
- Run an .exe file by itself?
- Invoke it from within a bach file?
- Invoke it from within a VB Script file?

If it is the last one, have you looked at the "exec" and "run"
methods of the WScript.Shell object?


From: Saucer Man on

"Pegasus (MVP)" <I.can(a)fly.com.oz> wrote in message
news:eFdwVDmnIHA.4712(a)TK2MSFTNGP04.phx.gbl...
>
>>
> Your question is a little unclear. Which of the following to
> you mean:
> - Run an .exe file by itself?
> - Invoke it from within a bach file?
> - Invoke it from within a VB Script file?
>
> If it is the last one, have you looked at the "exec" and "run"
> methods of the WScript.Shell object?
>
>
I was looking to invoke it from a VBScript. I think I need a (two) pairs of
quotes around the actual path and .exe and then a set of quotes around the
whole thing. Like this...

"""c:\program files\test.exe"" -address 10.1.2.3"


From: Tom Lavedas on
On Apr 15, 8:03 am, "Saucer Man" <saucer...(a)nospam.com> wrote:
> "Pegasus (MVP)" <I....(a)fly.com.oz> wrote in message
>
> news:eFdwVDmnIHA.4712(a)TK2MSFTNGP04.phx.gbl...
>
> > Your question is a little unclear. Which of the following to
> > you mean:
> > - Run an .exe file by itself?
> > - Invoke it from within a bach file?
> > - Invoke it from within a VB Script file?
>
> > If it is the last one, have you looked at the "exec" and "run"
> > methods of the WScript.Shell object?
>
> I was looking to invoke it from a VBScript. I think I need a (two) pairs of
> quotes around the actual path and .exe and then a set of quotes around the
> whole thing. Like this...
>
> """c:\program files\test.exe"" -address 10.1.2.3"

You also need the Run or the Exec method to 'shell out' to the command
environment ...

with createobject("wscript.shell")
.run """c:\program files\test.exe"" -address 10.1.2.3", 0, true
end with
wsh.echo "Done"

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
From: Saucer Man on
Ok. Thanks!


"Tom Lavedas" <tglbatch(a)cox.net> wrote in message
news:904fece6-198b-41e5-8b84-c2e8a2edbdfc(a)b1g2000hsg.googlegroups.com...
> On Apr 15, 8:03 am, "Saucer Man" <saucer...(a)nospam.com> wrote:
>> "Pegasus (MVP)" <I....(a)fly.com.oz> wrote in message
>>
>> news:eFdwVDmnIHA.4712(a)TK2MSFTNGP04.phx.gbl...
>>
>> > Your question is a little unclear. Which of the following to
>> > you mean:
>> > - Run an .exe file by itself?
>> > - Invoke it from within a bach file?
>> > - Invoke it from within a VB Script file?
>>
>> > If it is the last one, have you looked at the "exec" and "run"
>> > methods of the WScript.Shell object?
>>
>> I was looking to invoke it from a VBScript. I think I need a (two) pairs
>> of
>> quotes around the actual path and .exe and then a set of quotes around
>> the
>> whole thing. Like this...
>>
>> """c:\program files\test.exe"" -address 10.1.2.3"
>
> You also need the Run or the Exec method to 'shell out' to the command
> environment ...
>
> with createobject("wscript.shell")
> .run """c:\program files\test.exe"" -address 10.1.2.3", 0, true
> end with
> wsh.echo "Done"
>
> Tom Lavedas
> ===========
> http://members.cox.net/tglbatch/wsh/
>