title: delphi 7, FastMM4 cannot install work around
body: <p>i am working on an application that uses <code>FastMM4</code>, from <a href="http://sourceforge.net/projects/fastmm/files/" rel="nofollow noreferrer">sourceforge.net</a>.
  So i have added the <code>FastMM4.pas</code> to the uses clause right at the beginning. In the application i need to run a <code>batch</code> file after <code>FinalizeMemoryManager;</code> in the <code>finalization</code> of <code>unit FastMM4;</code> like this </p>
  
  <pre><code>  initialization
          RunInitializationCode;
  
    finalization
          {$ifndef PatchBCBTerminate}
          FinalizeMemoryManager;
          RunTheBatFileAtTheEnd; //my code here..calling a procedure
         {$endif}
  
   end.
  </code></pre>
  
  <p>then my code for <strong>RunTheBatFileAtTheEnd</strong> is :</p>
  
  <pre><code> procedure RunTheBatFileAtTheEnd;
   begin
   //some code here....
    sFilePaTh:=SysUtils.ExtractFilePath(applicaTname)+sFileNameNoextension+'_log.nam';
   ShellExecute(applcatiOnHAndle,'open', pchar(sExeName),pchar(sFilePaTh), nil, SW_SHOWNORMAL) ;
   end;
  </code></pre>
  
  <p>For this i need to use <code>SysUtils,shellapi</code> in the uses clause of fastmm4 unit. <strong>But</strong> using them 
  this message comes 
  <img src="https://i.stack.imgur.com/3lPfk.jpg" alt="enter image description here"></p>
  
  <p>But if i remove <code>SysUtils,shellapi</code> from the uses it works.
  I still need all the features of fastmm4 installed but with <code>SysUtils,shellapi</code>, fastmm4 is not installed</p>
  
  <p>I have a unit of my own but its finalization is executed before fastmm4 finalization.</p>
  
  <p>can anyone tell me can how to fix this problem?</p>
  
  <p><strong>EDIT- 1</strong></p>
  
  <pre><code>unit FastMM4;
  //...
  ...
  implementation
  
   uses
     {$ifndef Linux}Windows,{$ifdef FullDebugMode}{$ifdef Delphi4or5}ShlObj,{$else}
    SHFolder,{$endif}{$endif}{$else}Libc,{$endif}FastMM4Messages,SysUtils,shellapi;
  </code></pre>
  
  <p>my application</p>
  
  <pre><code> program memCheckTest;
     uses
        FastMM4,
  </code></pre>
  
  <p><strong>EDIT-2 :</strong> </p>
  
  <p>(after @SertacAkyuz answer),i removed <code>SysUtils</code> and it worked , but i still need to run the batch file to open an external application through <code>RunTheBatFileAtTheEnd</code>. The Reason is ..i want a external application to run only after FastMM4 as been out of the <code>finalization</code>. The <code>sExeName</code> is the application that will run the file <code>sFilePaTh</code>(.nam) . can any one tell how to do this? without <code>uninstalling FastMM4</code>. </p>