Re: Shell Functions and DOS executables



Click: Project --> References and then select Windows Script Host Object
Model from the reference list.


"VB_Newby" <VB_Newby@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:43d192b4$0$51452$892e7fe2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> "VB_Newby" <VB_Newby@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:43c05173$0$72436$892e7fe2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>
>> <Re-ordered for clarity>
>>
>> I'm running a DOS executable from a VB Shell function.
>>
>> If it's successful, it looks like this (at the DOS prompt):
>> cnvrtwfm -l tek00001.wfm
>> Creating tek00001.dat
>>
>>It it's unsuccessful, it looks like this (at the DOS prompt):
>> cnvrtwfm -l tek00001.wfm
>> Error Converting tek00001.wfm
>>
>> How can I retrieve the command line output of a Shell'ed DOS
>> executable?

> Lance Wynn said:
> Hello,
> Something along these lines may work for you.
> (Make a reference in your project to the "Windows Script Host
> Object Model")
>
> Dim wsh As IWshRuntimeLibrary.WshShell
> Dim wshExec As IWshRuntimeLibrary.wshExec
> Dim results as string
> Set wsh = New WshShell
> Set wshExec = wsh.Exec("c:\test.bat")
> results = wshExec.StdOut.ReadAll

Can someone further elaborate on how to integrate this into my VB
program. I don't know how to "make a reference to a Windows Script
Host Object Model". I'm just above clueless... but learning. ;-D

(I tried redirecting the DOS command output via ">" but for some
reason this silly DOS program won't be redirected to a file.)


.



Relevant Pages

  • Re: Windows XP PC question
    ... Someone told me a story of a time when his XP machine could not boot, ... he had to boot into a command prompt (its not technically called dos, ... because very few had extensive knowledge of the mac. ... > you certainly won't get a DOS prompt! ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Windows XP PC question
    ... Someone told me a story of a time when his XP machine could not boot, ... he had to boot into a command prompt (its not technically called dos, ... because very few had extensive knowledge of the mac. ... > you certainly won't get a DOS prompt! ...
    (microsoft.public.windowsxp.hardware)
  • Re: Windows XP PC question
    ... Someone told me a story of a time when his XP machine could not boot, ... he had to boot into a command prompt (its not technically called dos, ... because very few had extensive knowledge of the mac. ... > you certainly won't get a DOS prompt! ...
    (microsoft.public.windowsxp.general)
  • RE: DOS based program
    ... As in John Rampling's response you can try to run it in the DOS prompt in XP. ... Your program will not auto load. ... > computer that I can't figure out how to load on my new Windows XP system. ...
    (microsoft.public.windowsxp.newusers)
  • Re: Using tasm
    ... I just recreated the DOS program myself. ... Interrupt 20h is used to end a DOS program. ... If you run the program from inside a DOS prompt though, ... This command tells debug to start assembling at line 100. ...
    (alt.lang.asm)