pythoninno-setupshortcut-file

Create desktop shortcut to exe with argument with Inno Setup


I'm trying to create an installer for a Python script with Inno Setup. My goal is to have a single installer.

With Inno Setup, I packed my Python script, an embedded version of Python, and an icon.

But I don't figure how to tell to Inno Setup that my app is a .exe with an argument like:

.\python.exe .\myScript.py

I want to create an icon that will execute ".\python.exe .\myScript.py"

Is there any way to do this?


Solution

  • To create a desktop icon that will execute installed python.exe with your script as an argument, add an entry to [Icons] section of your Inno Setup script:

    [Icons]
    Name: "{autodesktop}\My Program"; Filename: "python.exe"; \
        Parameters: ".\myScript.py"; WorkingDir: "{app}"