Link to home
Start Free TrialLog in
Avatar of dcadler
dcadler

asked on

How can I pass the output of an EXE file as a parameter into a vbscript file?

I have an executable program called conApp.exe, that retrieves information from BIOS and displays it to the screen as a string of text.

So, if I type conApp.exe from an elevated command prompt, I get the text string displayed to the screen

For example;

c:\windows\system32>conApp.exe
v1.02.13
c:\windows\system32>

Typically I redirect that output to a text file so I can use it in another script.

for example; c:\windows\system32>conApp.exe > biosVer.txt

What I would like to do is pass the string of text generated by conApp.exe into variable in a VBScript file and manipulate that text within the VBScript.

for example; testscript1.vbs conApp.exe

How can I do this?

Thanks,

Dave
SOLUTION
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Good point Bill.  You could almost certainly do away with the need for the EXE altogether and just query the bios setting you want too directly in the VBS.

Steve
Avatar of dcadler
dcadler

ASKER

I will test this and let you know the results.
Avatar of dcadler

ASKER

Thanks for you help