Computing.Net > Forums > Programming > completely disable output of reg query

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

completely disable output of reg query

Reply to Message Icon

Name: eqagunn
Date: May 28, 2009 at 04:24:10 Pacific
OS: Windows Vista Ultimate x64 incl. SP1
CPU/Ram: 2 GB
Subcategory: Batch
Comment:

For example, when using:

reg query "HKEY_CURRENT_USER\Software\Product" /v "InstallPath"

it will output all values of that string.

If we put >nul at the end, there will be no output,
but only if that specific registry string exists.

If registry string doesn't exist, it will
still output an error, although we used >nul.

My question is: "How to hide that error output?"

P.S. Echo has been set off.



Sponsored Link
Ads by Google

Response Number 1
Name: Shaka
Date: May 28, 2009 at 05:40:58 Pacific
Reply:

I cannot test but 2>nul. If I understand correctly!


0

Response Number 2
Name: eqagunn
Date: May 28, 2009 at 06:27:42 Pacific
Reply:

Thx Shaka, I totally forgot about handles.

Using >nul 2>&1 solved my problem.

Thx again. :)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: completely disable output of reg query

Change reg query output www.computing.net/answers/programming/change-reg-query-output/17105.html

Reg query www.computing.net/answers/programming/reg-query/19792.html

Sql record count doubt www.computing.net/answers/programming/sql-record-count-doubt/13211.html