locate the installation directory of visual studio .net (or any other installed software)

Get installation directory path

I have seen people trying to locate the installation directory of visual studio .net (or any other installed software). Microsoft windows register the installation path of VS.net in the registry. To get the installation path you can request the registry for this information. Following is the code snippet for doing this

 

Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@”Software\Microsoft\VisualStudio\9.0″, true);

            string installationDirectoryPath = regKey.GetValue(“InstallDir”).ToString();

 

 

if there is any issue in this, please feel free to contact me at irfanyar@gmail.com

 

Cheers

Irfan Yar

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.