; Check if the required arguments were specified If $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 termination Exit 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