我想將屬性值更改爲對話框中的選定文本。如何在InstallScript中更改屬性
這是我的示例源。
#include "ifx.h"
STRING outPath;
export prototype MyFunction(HWND);
function OnFirstUIBefore()
NUMBER nResult, nSetupType, nvSize, nUser;
STRING szTitle, szMsg, szQuestion, svName, svCompany, szFile, szDir;
STRING szLicenseFile;
BOOL bCustom, bIgnore1, bIgnore2;
begin
Dlg_SdAskDestPath:
nResult = SdAskDestPath(szTitle, szMsg, INSTALLDIR, 0);
if (nResult = BACK) goto Dlg_SdAskDestPath;
Dlg_AskOutPath:
nResult = AskDestPath(szTitle, szmsg, szDir, 0);
if (nResult = BACK) goto Dlg_SdAskDestPath;
outPath = szDir;
MyFunction(ISMSI_HANDLE);
return 0;
end;
function MyFunction(hMSI)
STRING value;
begin
MsiSetProperty(hMSI, "OutPutPath", outPath);
end;
OutPutPath在完成安裝後用於自定義操作。
但在自定義操作中讀取時,OutPutPath未被更改。
我想我不能使用ISMSI_HANDLE。但我不知道我必須使用什麼。
我試圖做出自定義操作,在完成安裝後加載安裝腳本的方法MyFunction。
它運作良好,但全局變量outpath中爲NUL ..
請告訴我,我怎麼能做到這一點,如果你知道。
謝謝。