redirect output

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
mor.bas
Posts: 66
Joined: 25 Apr 2012 04:28

redirect output

#1 Post by mor.bas » 18 Dec 2012 01:23

I have this sentences in my batch file:

REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{147BCE03-C0F1-4C9F-8157-6A89B6D2D973}" /v DisplayVersion | findstr /C:"7.7.0" >nul 2>&1

Why I still having the error priniting on screen?

How to fix it?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: redirect output

#2 Post by foxidrive » 18 Dec 2012 01:31

The error is coming from before the pipe:

REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{147BCE03-C0F1-4C9F-8157-6A89B6D2D973}" /v DisplayVersion 2>&1 | findstr /C:"7.7.0" >nul

Post Reply