Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for readreg.kix

(view source code of readreg.kix as plain text)

  1. ; Check if the required arguments were specified
  2. If $section = ""
  3. 	GoTo Syntax
  4. EndIf
  5. If $key = ""
  6. 	GoTo Syntax
  7. EndIf
  8.  
  9. ; Read the requested value from the registry
  10. $val = ReadValue( $section, $key )
  11.  
  12. ; Display the result
  13. ? "[$section]"
  14. ? "$key=$val"
  15. ?
  16.  
  17. ; Normal program termination
  18. Exit 0
  19.  
  20.  
  21. :Syntax
  22. ? "ReadREG.kix,  Version 1.01"
  23. ? "Read a value from the registry"
  24. ?
  25. ? "Usage:  KIX32  READREG.KIX  $$SECTION=" + Chr(34) + "section" + Chr(34) + "  $$KEY=" + Chr(34) + "key" + Chr(34)
  26. ?
  27. ? "Where:           " + Chr(34) + "section" + Chr(34) + " is the registry section name, without brackets"
  28. ? "                 " + Chr(34) + "key" + Chr(34) + "     is the key whose value must be read"
  29. ?
  30. ? "Arguments should be enclosed in double quotes"
  31. ?
  32. ? "Example: read the user part of the PATH environment variable:"
  33. ? "KIX32  READREG.KIX  $$SECTION=" + Chr(34) + "HKEY_CURRENT_USER\Environment" + Chr(34) + "  $$KEY=" + Chr(34) + "Path" + Chr(34)
  34. ?
  35. ? "Written by Rob van der Woude"
  36. ? "http://www.robvanderwoude.com"
  37. ?
  38. Exit 1
  39.  

page last modified: 2024-04-16; loaded in 0.0060 seconds