Creating Windows Start Menu or Desktop shortcuts using setuptools bdist_winst installer

Yaşar Arabacı yasar11732 at
Sat Jul 19 16:23:10 CEST 2014

This is a cross-post from stackoverflow:

I am not sure about cross-posting policies of python-list. I am sorry
if this is discouraged.

Here is my problem;

I want to create a start menu or Desktop shortcut for my Python
windows installer package. I am trying to follow

Here is my script;

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', '')
w_dir = expanduser(join('~','lsf_files'))


if sys.argv[1] == '-install':
    print('Creating Shortcut')
        description='A program to work with L-System Equations',
        filename='L-System Tool',

I also specified this script in scripts setup option, as indicated by
aforementioned docs.

Here is the command I use to create my installer;

python bdist_wininst --install-script

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.

How can I make setuptools generated windows installer to create
desktop or start menu shortcuts?


More information about the Python-list mailing list