Capturing program output in a variable
A quick one to warm up some brains:
I have a program that outputs to stdout. Is there any simple way to capture that output in a variable? Only the 1st word matters. I've been thinking of this
but I want something much easier if possible. Should work under Win9x-NT-2K-XP
myprogram.exe [|arguments]>temp.var
for %%i in (temp.var) do set myvariable=%%i
del temp.var
call nextstep.bat %myvariable%
Also any ideea how to get the computer name and logged on username in Win95? %computername% and %username% don't exist there.
Auditing time has come here too :(
Ideeas? I smell smoke already :D