[Files]
Source: "C:\MyProg.exe"; DestDir: "{app}"; BeforeInstall: GetHome(); Flags: ignoreversion
[INI]
Filename: "{myVarFromPascal}\.MyProg\settings.ini"; Section: "Settings"; Key: "sound"; String: "1"; Flags: createkeyifdoesntexist
[Code]
procedure GetHome();
var
myPascalVar: String;
begin
RegQueryStringValue(HKEY_CURRENT_USER, 'Volatile Environment','USERPROFILE', myPascalVar);
MsgBox('Value is "' + myPascalVar + '"', mbInformation, MB_OK);
end;
这是我在 INNO Setup 中的三个示例部分。我想myPascalVar
在 INI 部分中使用。我该怎么做?