Re: echo, not echo
- From: "Dave Patrick" <DSPatrick@xxxxxxxxxxxxxxxx>
- Date: Mon, 31 Jul 2006 12:04:18 -0600
Maybe the Run method?
Dim oShell
Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "cmd /k echo %username%"
Set oShell = Nothing
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"Todd" wrote:
| Hello people,
|
| I need to use "echo" not wscript.echo in a script. huh? An example
| will probably help:
|
|
| cmd = "echo password| \Program Files\GNU\GnuPG\gpg --batch
| --decrypt-files --passphrase-fd 0 -d " & strIn
|
| Set Sh = CreateObject("WScript.Shell")
| Dim wsx: Set wsx = Sh.Exec(cmd)
| If wsx.ProcessID = 0 And wsx.Status = 1 Then
| Err.Raise vbObjectError,,"WshShell.Exec failed."
| End If
|
| --------------
|
| The "cmd" line runs fine from a prompt. I've searched but cannot find
| an "echo" executable.
|
| Any ideas on how I can use the other echo?
|
| Thanks in advance,
| Todd
|
.
- Follow-Ups:
- Re: echo, not echo
- From: Todd
- Re: echo, not echo
- References:
- echo, not echo
- From: Todd
- echo, not echo
- Prev by Date: echo, not echo
- Next by Date: Re: echo, not echo
- Previous by thread: echo, not echo
- Next by thread: Re: echo, not echo
- Index(es):
Relevant Pages
|