Scott Hanselman

Accessing the Registry from the Command Line

April 12, '06 Comments [1] Posted in Podcast | PowerShell
Sponsored By

In my recent "Utilities you didn't know you had" podcast, I realize now I totally forgot about REG.EXE.

I was reminded while browsing James Manning's blog

From CMD.EXE, this tells you where VS.NET 2005 is installed:

C:\>reg query HKLM\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS /v EnvironmentDirectory

Here's the same thing in MSH (gp is the alias for get-property):

MSH C:\>$(gp HKLM:\Software\Microsoft\VisualStudio\8.0\Setup\VS).EnvironmentDirectory

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Thursday, April 13, 2006 1:32:55 AM UTC
Oh man, reg.exe was indespensible during my days as a systems engineer. I don't how many times I used it in a .cmd script to verify versions of IIS, SQL or any number of patches. Honestly, I don't miss it all that much. :)
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.