Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Const HKEY_LOCAL_MACHINE = &H80000002
Const REG_SZ = 1
Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
'==========================================
Private Sub cmdGetRegKey_Click()
Dim RetVal As Long
Dim KeyHandle As Long
Dim KeyName As String
Dim ValType As Long
Dim ValSize As Long
Dim ValString As String
KeyName = "SOFTWARE\Classes\AcroExch.Document\shell\open\command"
RegOpenKey HKEY_LOCAL_MACHINE, KeyName, KeyHandle
[COLOR=green] ' Note the default value = "" not (Default)[/color]
RetVal = RegQueryValueEx(KeyHandle, "", 0, ValType, ByVal 0, ValSize)
If (RetVal = 0) Then
If (ValType = REG_SZ) Then
ValString = String(ValSize, Chr(0))
RetVal = RegQueryValueEx(KeyHandle, "", 0, 0, ByVal ValString, ValSize)
ValString = Left(ValString, InStr(ValString, Chr(0)) - 1)
MsgBox "Key Value = " & ValString
Else
MsgBox "This key not a string value"
End If
Else
MsgBox "Error reading key data - check key value"
End If
RegCloseKey KeyHandle
End Sub