title: Setting Icon for PyInstaller Application
body: <p>I have been all over Google, Reddit, StackOverflow, PyInstaller docs, I can't figure this out.</p>
  
  <p>I'm trying to set my icon for my application, but it will not work. The icon is applied to the main exe, however, the icon does not show in the taskbar when it is open for Windows.</p>
  
  <p>The icon is being included. I have set the value icon in EXE directly to the icon path. I have used <strong>Resource Hacker</strong>, I have used <strong>RCEDIT</strong>, which by the way, kills my application entirely. I, for the life of me, <strong>CANNOT</strong> get the icon of the application to show correctly.</p>
  
  <p>I have tried Windows 10 and Windows 7.</p>
  
  <p>Even when I run Pyinstaller without -F, it still won't load the icon. I'm 100% certain my file is an .ico file, and includes multiple acceptable sizes, Resource Hacker showed all acceptable sizes for the .ico.</p>
  
  <hr>
  
  <ul>
  <li><a href="https://i.stack.imgur.com/BSVpM.png" rel="noreferrer">Title Bar of the App</a> </li>
  <li><a href="https://i.stack.imgur.com/qwfB6.png" rel="noreferrer">App with the right icon, in the directory</a> </li>
  <li><a href="https://i.stack.imgur.com/11xvw.png" rel="noreferrer">App icon on the taskbar</a></li>
  </ul>
  
  <hr>
  
  <p>Here is the powershell command I'm using:</p>
  
  <pre><code>pyinstaller -F -i C:\aNote\theme\anoteicon.ico --clean anotemain.spec
  </code></pre>
  
  <p>Here is my .spec</p>
  
  <pre><code># -*- mode: python -*-
  
  block_cipher = None
  
  
  a = Analysis(['anotemain.py'],
               pathex=['C:\\aNote'],
               binaries=[],
               datas=[('c:\\aNote\\theme\\anoteicon.png','theme'), 
               ('c:\\aNote\\theme\\kabook.png','theme'), 
               ('c:\\aNote\\theme\\Python.svg.png','theme'), 
               ('c:\\aNote\\theme\\anoteicon.ico','.'), 
               ('c:\\aNote\\anoteui.py','.'),
               ('c:\\aNote\\version.txt','.')],
               hiddenimports=["PyQt5.sip", "QtGui", "QtWidgets", "pyperclip", "webbrowser", "csv"],
               hookspath=[],
               runtime_hooks=[],
               excludes=[],
               win_no_prefer_redirects=False,
               win_private_assemblies=False,
               cipher=block_cipher)
  pyz = PYZ(a.pure, a.zipped_data,
               cipher=block_cipher)
  exe = EXE(pyz,
            a.scripts,
            a.binaries,
            a.zipfiles,
            a.datas,
            name='aNote',
            debug=False,
            strip=False,
            upx=False,
            clean=True,
            runtime_tmpdir=None,
            console=False,
            icon='c:\\aNote\\theme\\anoteicon.ico',
            version='version.txt')
  </code></pre>