(view source code of readreg.kix as plain text)
; Check if the required arguments were specifiedIf $section = ""
GoTo Syntax
EndIf
If $key = ""
GoTo Syntax
EndIf
; Read the requested value from the registry$val = ReadValue( $section, $key )
; Display the result? "[$section]"
? "$key=$val"
?; Normal program terminationExit 0
:Syntax? "ReadREG.kix, Version 1.01"
? "Read a value from the registry"
?? "Usage: KIX32 READREG.KIX $$SECTION=" + Chr(34) + "section" + Chr(34) + " $$KEY=" + Chr(34) + "key" + Chr(34)
?? "Where: " + Chr(34) + "section" + Chr(34) + " is the registry section name, without brackets"
? " " + Chr(34) + "key" + Chr(34) + " is the key whose value must be read"
?? "Arguments should be enclosed in double quotes"
?? "Example: read the user part of the PATH environment variable:"
? "KIX32 READREG.KIX $$SECTION=" + Chr(34) + "HKEY_CURRENT_USER\Environment" + Chr(34) + " $$KEY=" + Chr(34) + "Path" + Chr(34)
?? "Written by Rob van der Woude"
? "http://www.robvanderwoude.com"
?Exit 1
page last modified: 2025-10-11; loaded in 0.0089 seconds