Cant Save The Output of Command to variable

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
roeer
Posts: 2
Joined: 20 Oct 2009 09:47

Cant Save The Output of Command to variable

#1 Post by roeer » 20 Oct 2009 09:51

any one can help me please


Code: Select all

SET VAR001=cscript  C:\CheckVersion\VersionInfo.vbs C:\Program~1\FMR\TaskBarService\TaskBarService.exe

if (%VAR001%)=="1.4.0.2" BLA BLA BLA ITS OK

pause


Thanks Alot
Roee Rahamim

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

#2 Post by avery_larry » 20 Oct 2009 18:15

Something like this:

**untested**

Code: Select all

for /f %%a in ('C:\CheckVersion\VersionInfo.vbs C:\Program~1\FMR\TaskBarService\TaskBarService.exe') do set "VAR001=%%a"

if "%VAR001%"=="1.4.0.2" echo OK

roeer
Posts: 2
Joined: 20 Oct 2009 09:47

#3 Post by roeer » 21 Oct 2009 01:24

Wow
Thanks alot its works....

:)

Post Reply