title: A command in a .bat file is unrecognized when the .bat file is called from an Inno Setup but works fine when I run the bat file manually
body: <p>I have the following .bat file:</p>
  
  <pre><code>fbwfmgr /enable
  .
  .
  .
  fbwfmgr /addexclusion c: "some folder 1"
  fbwfmgr /addexclusion c: "some folder 2"
  .
  .
  .
  </code></pre>
  
  <p>which I'm calling from the <code>[Run]</code> section in my Inno Setup like this:</p>
  
  <pre><code>Filename: "{tmp}\set_write_protection_rules.bat";
  </code></pre>
  
  <p>I have also tried this:</p>
  
  <pre><code>Filename: "{cmd}"; Parameters: "/c ""{tmp}\set_write_protection_rules.bat""";    
  </code></pre>
  
  <p>I always get the message</p>
  
  <blockquote>
    <p>'fbwfmgr' is not recognized as an internal or external command, operable program or batch file.</p>
  </blockquote>
  
  <p>If I run the .bat file by double clicking on it it works, if I run it from a cmd window myself it works. What am I missing here?</p>
  
  <p>I'm running this on a Windows Embedded Standard x64 system logged in as the administrator.</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>Adding the full path to the <code>fbwfmgr.exe</code> does not solve the issue (I have also manually looked that that's the actual location of <code>fbwfmgr.exe</code>):</p>
  
  <pre><code>%systemroot%\system32\fbwfmgr.exe /enable
  </code></pre>
  
  <p>I found <a href="https://social.msdn.microsoft.com/Forums/en-US/758207dc-a888-428f-8b50-04c1620677ad/running-batch-file-to-enable-fbwf-from-vb-application?forum=quebeceefs" rel="nofollow noreferrer">a similar thread here</a> where the OP is having the same problem while running the .bat file from vbs, no solution seems to have been found there. From a suggestion there to cut the middle man I've tried calling <code>fbwfmgr</code> directly from Inno Setup with the following line:</p>
  
  <pre><code>Filename: "{cmd}"; Parameters: "c/ ""fbwfmgr /enable""";
  </code></pre>
  
  <p>but to no use. It just opens an empty console window. When I try to call <code>fbwfmgr</code> from there, it is not recognized.</p>