Hi my friends im trying to build an exe which echo installed applications on 
computer.

This is my code:

import winregistry

const
    HKEY_CLASSES_ROOT*: RegHandle = 0x80000000.RegHandle HKEY_CURRENT_USER*: 
RegHandle = 0x80000001.RegHandle HKEY_LOCAL_MACHINE*: RegHandle = 
0x80000002.RegHandle HKEY_USERS*: RegHandle = 0x80000003.RegHandle 
HKEY_PERFORMANCE_DATA*: RegHandle = 0x80000004.RegHandle HKEY_CURRENT_CONFIG*: 
RegHandle = 0x80000005.RegHandle HKEY_DYN_DATA*: RegHandle = 
0x80000006.RegHandle

#Part1 Get HKEY_CURRENT_USER

var
    h: RegHandle #Open Current User subkeypath: RegHandle #Open Subkeys value: 
RegHandle #Read DisplayName Value

h = 
open(HKEY_CURRENT_USER,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", 
samRead)

for subkeypath in h.enumSubkeys():
    value = open(h, subkeypath, samRead) let result = 
value.readString("DisplayName") echo result

close(h)

> #Part 2 Get HKEY_LOCAL_MACHINE

var
    h1: RegHandle #Open Local User subkeypath1: RegHandle #Open Subkeys value1: 
RegHandle #Read DisplayName Value

h1 = 
open(HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", 
samRead)

for subkeypath1 in h1.enumSubkeys():
    echo subkeypath1 value1 = open(h1, subkeypath1, samRead) let result1 = 
value1.readString("DisplayName") echo result1

close(h1)

The part 1 is works fine but, when i add Part 2 im getting an error like "the 
system cannot find the path specified" [Registryerror]

Note:In part 2 I can see Subkeys of h1 but can't read

Sorry for bad English

Reply via email to