title: How to create a shortcut in startmenu using setuptools windows installer
body: <p>I want to create a start menu or Desktop shortcut for my Python windows installer package. I am trying to follow <a href="https://docs.python.org/3.4/distutils/builtdist.html#the-postinstallation-script" rel="noreferrer">https://docs.python.org/3.4/distutils/builtdist.html#the-postinstallation-script</a></p>
  
  <p>Here is my script;</p>
  
  <pre><code>import sys
  
  from os.path import dirname, join, expanduser
  
  pyw_executable = sys.executable.replace('python.exe','pythonw.exe')
  script_file = join(dirname(pyw_executable), 'Scripts', 'tklsystem-script.py')
  w_dir = expanduser(join('~','lsf_files'))
  
  print(sys.argv)
  
  if sys.argv[1] == '-install':
      print('Creating Shortcut')
      create_shortcut(
          target=pyw_executable,
          description='A program to work with L-System Equations',
          filename='L-System Tool',
          arguments=script_file,
          workdir=wdir
      )
  </code></pre>
  
  <p>I also specified this script in scripts setup option, as indicated by aforementioned docs.</p>
  
  <p>Here is the command I use to create my installer;</p>
  
  <pre><code>python setup.py bdist_wininst --install-script tklsystem-post-install.py
  </code></pre>
  
  <p>After I install my package using created windows installer, I can't find where my shorcut is created, nor I can confirm whether my script run or not?</p>
  
  <p>How can I make setuptools generated windows installer to create desktop or start menu shortcuts?</p>