title: Acces Denied to open file using winapps and subprocess in Python
body: <p>I am trying to use winapps and subprocess to search for an app or game on my windows computer and open the app. The error message I receive when I search for something like Firefox or Dying Light 2 is this:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;c:\Users\Username\Desktop\python_scripts\windyap.py&quot;, line 10, in &lt;module&gt;
      subprocess.Popen(query)
    File &quot;C:\Users\Username\AppData\Local\Programs\Python\Python310\lib\subprocess.py&quot;, line 966, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File &quot;C:\Users\Username\AppData\Local\Programs\Python\Python310\lib\subprocess.py&quot;, line 1435, in _execute_child
      hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
  PermissionError: [WinError 5] Access is denied
  </code></pre>
  <p>The code:</p>
  <pre><code>import winapps
  import subprocess
  
  program = input(&quot;What program do you want to search for: &quot;)
  
  for item in winapps.search_installed(program):
      query = item.install_location
      print(query)
      subprocess.Popen(query)
  </code></pre>
  <p>I have tried running the program an administrator command prompt and this did not fix the access denied issue. Additionally, I tried running the program from a batch file that was run as administrator and still received the same issue. The User I am currently running on is an administrator. This machine is running windows 10. I am used to Linux systems and would either run this command with sudo or chmod +x the file normally. Is there something similar I can do on Windows that does not require any extra code within the script?</p>