Example 1
--Demonstrates the Lua Windows Registry interface
--Open the registry on the host determined by the current context
Reg = TLuaRegistry();
if Reg:Open(Reg.LOCAL_MACHINE,"SOFTWARE\\Kaseya") == true then
sValue = "";
bOK,sValue = Reg:ReadValue("test",sValue);
else
Reg:SetValue("test","a test value");
end
Example 2
--Demonstrates the Lua Windows Registry interface
--Open the registry on the localhost
Reg = TLuaRegistry(true);
if Reg:Open(Reg.LOCAL_MACHINE,"SOFTWARE\\Kaseya") == true then
sValue = "";
bOK,sValue = Reg:ReadValue("test",sValue);
else
Reg:SetValue("test","a test value");
end