Step 1) Add Namespace Microsoft.Win32
Step 2) how to find asp.net version installed
Private Sub Get_Asp_net_Installed_versions()
Console.WriteLine()
Console.WriteLine()
Try
asp.net versions installed 2.0.50727.0
asp.net versions installed 4.0.30319.0
Step 2) how to find asp.net version installed
Private Sub Get_Asp_net_Installed_versions()
Console.WriteLine()
Console.WriteLine()
Try
Dim key As RegistryKey = Registry.LocalMachine
Dim dotnetkey As RegistryKey = key.OpenSubKey("SOFTWARE\Microsoft\ASP.NET\", RegistryKeyPermissionCheck.[Default], System.Security.AccessControl.RegistryRights.FullControl)
For Each NameValue As [String] In dotnetkey.GetSubKeyNames()
Console.WriteLine("asp.net versions installed {0}", NameValue)
Next
Dim dotnetkey As RegistryKey = key.OpenSubKey("SOFTWARE\Microsoft\ASP.NET\", RegistryKeyPermissionCheck.[Default], System.Security.AccessControl.RegistryRights.FullControl)
For Each NameValue As [String] In dotnetkey.GetSubKeyNames()
Console.WriteLine("asp.net versions installed {0}", NameValue)
Next
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
Console.WriteLine(ex.Message)
End Try
End Sub
Output
asp.net versions installed 2.0.50727.0
asp.net versions installed 4.0.30319.0
No comments:
Post a Comment