Search the web
Sign In
New User? Sign Up
win_tech_off_topic · Windows Technical: Off Topic
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
CLS is a cool error handler...   Message List  
Reply | Forward Message #59167 of 59849 |
I'd always noticed that setenv cleared the screen, but I never took the time to figure out why...
 
:: Read the value for VCRoot and VSRoot from the registry.
FOR /F "tokens=2* delims=  " %%A IN ('REG QUERY "%RegKeyPath%" /v 9.0') DO SET VCRoot=%%B
FOR /F "tokens=2* delims=  " %%A IN ('REG QUERY "%VSRegKeyPath%" /v 9.0') DO SET VSRoot=%%B
 
:: Hide the error output from the call to 'REG' since VCRoot and VSRoot have already been set
:: to a default value.
CLS
 
 
Might be nicer to actually redirect the output...
 
:: Read the value for VCRoot and VSRoot from the registry.
FOR /F "tokens=2* delims=  " %%A IN ('REG QUERY "%RegKeyPath%" /v 9.0 ^>NUL 2^>^&1') DO SET VCRoot=%%B
FOR /F "tokens=2* delims=  " %%A IN ('REG QUERY "%VSRegKeyPath%" /v 9.0 ^>NUL 2^>^&1') DO SET VSRoot=%%B
 
...and less annoying when you're invoking setenv from an existing cmd shell...


Thu Jan 8, 2009 8:39 pm

glenncarr
Offline Offline
Send Email Send Email

Forward
Message #59167 of 59849 |
Expand Messages Author Sort by Date

I'd always noticed that setenv cleared the screen, but I never took the time to figure out why... ... FOR /F "tokens=2* delims= " %%A IN ('REG QUERY...
Glenn Carr
glenncarr
Offline Send Email
Jan 8, 2009
8:40 pm

Oops, how about this... FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "%RegKeyPath%" /v 9.0 2^>NUL') DO SET VCRoot=%%B FOR /F "tokens=2* delims= " %%A IN...
Glenn Carr
glenncarr
Offline Send Email
Jan 8, 2009
11:25 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help