1
我想查找一個註冊表,但它始終返回-1(不存在),即使它實際存在。RegDBKeyExists總是返回-1(不正確)
請看看我的代碼,看看,如果我失去了一些東西:
export prototype installFramework(HWND);
function installFramework(hMSI)
STRING szProgram, szKey, szName, szValue, szMsg;
NUMBER reg, nSize, nResult;
begin
REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY;
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
reg = RegDBKeyExist("SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\Install");
if (reg < 0) then
szMsg = "Message here.";
MessageBox (szMsg, INFORMATION);
szProgram = INSTALLDIR^"dotnetfx40_full_x86_x64.exe";
LaunchAppAndWait(szProgram, "", WAIT);
endif;
end;
這正是問題所在!謝謝! – 2012-03-20 11:34:55