title: Inno Setup Compiler: How to use a constant from Setup region within a event method
body: <p>within the <code>inno setup compiler</code> there are regions like:</p>
  
  <pre><code>[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;
  </code></pre>
  
  <p>how can i use the <code>DefaultDirName</code> const from the [Setup] region, within the function?</p>
  
  <p>ps:</p>
  
  <p><code>ExecInfo.lpFile := DefaultDirName + '\{#Exewampmanager}';</code> does not work</p>