'$Include:'WinReg.BI'
'The following code demonstrates creating a new registry key to use a custom URL protocol of "qb64:" to launch qb64.exe
status = CreateRegistryKey(HKEY_CLASSES_ROOT, "qb64")
Print "Failed to create key"
status = WriteREG_SZ(HKEY_CLASSES_ROOT, "qb64", "", "URL:QB64 Protocol")
Print "Failed to insert value into registry key"
status = WriteREG_SZ(HKEY_CLASSES_ROOT, "qb64", "URL Protocol", "")
Print "Failed to insert value into registry key"
status = WriteREG_SZ(HKEY_CLASSES_ROOT, "qb64", "DefaultIcon", "qb64.exe,1")
Print "Failed to insert value into registy key"
status = CreateRegistryKey(HKEY_CLASSES_ROOT, "qb64\shell\open\command")
Print "Failed to create key"
status
= WriteREG_SZ
(HKEY_CLASSES_ROOT
, "qb64\shell\open\command", "", Chr$(34) + _CWD$ + "\qb64.exe" + Chr$(34) + " " + Chr$(34) + "%1" + Chr$(34)) Print "Failed to insert value into registry key"
status = ReadREG_SZ(HKEY_CLASSES_ROOT, "qb64\shell\open\command", "", cmd)
Print "Failed to read value"
'Delete the key we just made
Print DeleteRegistryKey
(HKEY_CLASSES_ROOT
, "qb64") '$Include:'WinReg.BM'