title: Why can't Ansible find an executable that's in the system path?
body: <p>Ansible v2.11
  Target: Windows 2012 Server</p>
  <p>I'm trying to unzip a file using the <code>C:\Program Files\7-zip\7z.exe</code> utility, and that folder is in the system path. I can't use <code>win_unzip</code> because of long file names. However I get this?</p>
  <pre><code>- name: &quot;Unzip exa-web {{ exa_web_zip }}&quot;
    win_command:
      7z x {{ remote_dir }}/{{ exa_web_zip }} -o{{ exa_web_dir }}
  
  TASK [exa-web : Unzip exa-web exa-web-development-b7cf4eee3c-20210930_1700-win64.zip] ***
  fatal: [172.16.100.31]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;cmd&quot;: &quot;7z x C:\\temp/exa-web-development-b7cf4eee3c-20210930_1700-win64.zip -oC:\\Viztek\\EXA\\web&quot;, &quot;msg&quot;: &quot;Exception calling \&quot;SearchPath\&quot; with \&quot;1\&quot; argument(s): \&quot;Could not find file '7z.exe'.\&quot;&quot;, &quot;rc&quot;: 2}
  </code></pre>
  <p>I even added this task just to ensure that is is in the system path, to no avail.</p>
  <pre><code>- name: Add to system path
    win_path:
      elements:
        - &quot;C:\\Program Filse\\7-zip&quot;
  </code></pre>
  <p>What am I missing?</p>