title: pyinstaller exe works when running from powershell but doesn't when double clicking
body: <p>When I open PowerShell in the same directory as my pyinstaller-generated main.exe and run <code>./main.exe/</code> it runs fine, but when double-clicking it I get the error: <a href="https://i.stack.imgur.com/uktQC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uktQC.png" alt="enter image description here" /></a>.</p>
  <p>I used this command: <code>pyinstaller --onefile --noconsole --hidden-import time --hidden-import me --hidden-import selenium --hidden-import os --hidden-import webdriver_manager --hidden-import PySimpleGUI .\main.py</code> to create the file program, which is a windowed ap\plication created with PySimpleGUI.</p>
  <p>Why can't I run the program doubleclicking it, but it works fine when using PowerShell?</p>