Option Strict On
Imports Microsoft.Win32
Public Module GetRegistryValue
Public Sub Main()
Dim appTextFiles As String = _
CStr(Registry.GetValue("HKEY_CLASSES_ROOT\txtfile\shell\open\command", _
"", String.Empty))
appTextFiles = Left(appTextFiles, InStr(1, appTextFiles, "") - 1)
Console.WriteLine("Text files are handled by {0}.", appTextFiles.Trim())
End Sub
End Module
|