cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sbrown
Level 6

Installscript project can't write to 64 registry

I'm sure I''m missing something simple but I don't see it.

Why does this only write to the Wow6432Node registry key??
Pure Installscript 2011 project.

function OnBegin()
NUMBER i, nAutoSize, nResult;
STRING sTemp;
begin

nAutoSize = -1;
// TODO: Perform custom initialization steps, check requirements, etc.
nResult = Disable (WOW64FSREDIRECTION);
nResult = REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY;
nResult = RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);


if (RegDBKeyExist(PROPERTY_KEY) < 0) then
nResult = RegDBCreateKeyEx(PROPERTY_KEY, "");
if nResult <0 then
MessageBox(FormatMessage(nResult), SEVERE);
endif;
endif;

nResult = RegDBSetKeyValueEx(PROPERTY_KEY, "test1", REGDB_STRING, "sb1", nAutoSize);
nResult = RegDBSetKeyValueEx(PROPERTY_KEY, "test2", REGDB_STRING, "sb2", nAutoSize);
nResult = RegDBSetKeyValueEx(PROPERTY_KEY, "test3", REGDB_STRING, "sb3", nAutoSize);


Enable(WOW64FSREDIRECTION);

end;
Labels (1)
0 Kudos
(2) Replies
Not applicable

function OnBegin()
NUMBER i, nAutoSize, nResult;
STRING sTemp;
begin

nAutoSize = -1;
// TODO: Perform custom initialization steps, check requirements, etc.
//nResult = Disable (WOW64FSREDIRECTION);
REGDB_OPTIONS = REGDB_OPTION_WOW64_64KEY;
nResult = RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);


if (RegDBKeyExist(PROPERTY_KEY) < 0) then
nResult = RegDBCreateKeyEx(PROPERTY_KEY, "");
if nResult <0 then
MessageBox(FormatMessage(nResult), SEVERE);
endif;
endif;

nResult = RegDBSetKeyValueEx(PROPERTY_KEY, "test1", REGDB_STRING, "sb1", nAutoSize);
nResult = RegDBSetKeyValueEx(PROPERTY_KEY, "test2", REGDB_STRING, "sb2", nAutoSize);
nResult = RegDBSetKeyValueEx(PROPERTY_KEY, "test3", REGDB_STRING, "sb3", nAutoSize);


//Enable(WOW64FSREDIRECTION);

end;
0 Kudos
sbrown
Level 6

Thanks I knew it would be something simple that I just wasn't seeing.
No return value for regdb_options kept biteing me.
0 Kudos