function OnBegin()
STRING szKey, szName, szValue;
NUMBER nType, nSize;
begin
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System";
// Set up parameters for call to RegDBSetKeyValueEx.
szName = "EnableLUA";
szValue = "0";
nType = REGDB_NUMBER;
nSize = -1;
// Set a key name and a value associated with it.
if (RegDBSetKeyValueEx (szKey, szName, nType, szValue,
nSize) < 0) then
MessageBox ("RegDBSetKeyValueEx failed.", SEVERE);
abort;
endif;
end;