Scott Hanselman

Accessing the Registry from the Command Line

April 13, 2006 Comment on this post [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
Hosting By
Hosted in an Azure App Service
April 13, 2006 5:32
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.