How to create a shortcut in windows to get rid of the console window

  1. Open a windows explorer and navigate to the folder the script is saved in.
  2. Right-click the script and hold the right button while dragging it in the same folder.
  3. Select the "Create Shortcuts here" option to create a shortcut to the script
  4. Open another windows explorer and find the directory Python is installed in (For me "C:\Python26")
  5. Go back to the created shortcut and right-click it.
  6. Select "Properties" to get the property dialog for the shortcut.
  7. Go to the "Target" entry box in the properties of the shortcut. Now add the folder python is installed in and a pythonw.exe in front of the script name. (For me "C:\Python26\pythonw.exe"). Then press "ok".
  8. Double click the shortcut if you want to run the script without a console window. A double click on the script will still start the script with the console window.
Back to index page