TLuaRegistryExample 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 | |||
|
Topic 9730: Send Feedback. Download a PDF of this online book from the first topic in the table of contents. Print this topic. |