其中inno setup compiler
有以下地区:
[Setup]
DefaultDirName={pf}\cow1
function NextButtonClick(CurPageID: Integer): Boolean;
var
ExecInfo: TShellExecuteInfo;
begin
Result := True;
if CurPageID = wpFinished then
begin
ExecInfo.cbSize := SizeOf(ExecInfo);
ExecInfo.fMask := SEE_MASK_NOCLOSEPROCESS;
ExecInfo.Wnd := 0;
ExecInfo.lpFile := DefaultDirName + '\{#Exewampmanager}';
ExecInfo.nShow := SW_HIDE;
if ShellExecuteEx(ExecInfo) then
begin
if WaitForSingleObject(ExecInfo.hProcess, 3000) = WAIT_TIMEOUT then
begin
TerminateProcess(ExecInfo.hProcess, 666);
MsgBox('You just killed a little kitty!', mbError, MB_OK);
end
else
MsgBox('The process was terminated in time!', mbInformation, MB_OK);
end;
end;
end;
如何在函数中使用DefaultDirName
[Setup] 区域中的 const?
ps:
ExecInfo.lpFile := DefaultDirName + '\{#Exewampmanager}';
不工作