Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/lua-winreg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_5_1_14.lua')
-rw-r--r--test/test_5_1_14.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_5_1_14.lua b/test/test_5_1_14.lua
new file mode 100644
index 0000000..a5fb409
--- /dev/null
+++ b/test/test_5_1_14.lua
@@ -0,0 +1,21 @@
+local winreg = require "winreg"
+
+local p = [[HKEY_LOCAL_MACHINE\SOFTWARE]]
+
+local key64 = assert(winreg.openkey(p, 'r64'))
+local key32 = assert(winreg.openkey(p, 'r32'))
+
+function DumpKeys(hkey)
+ for name in hkey:enumvalue() do
+ result, type = hkey:getvalue(name)
+ print(name, result, type)
+ end
+end
+
+print('X64:')
+DumpKeys(key64)
+print("---------------------------------")
+print('X32:')
+DumpKeys(key32)
+print("---------------------------------")
+