Vespa Shortcuts under Win 10 installations

Vespa has had problems with shortcuts since Win 10 came out. This post will walk you through setting up shortcuts manually.

So, this assumes that you have installed Python 2.7.x using miniconda. The command used below allows any conda environment that you have created in your miniconda directory to be used, so it’s OK if you have several set up other than 2.7.x

  1. Right click on your desktop, and create a New Shortcut.
  2. In the dialog that pops up, browse for any Python (*.py) file (to get the corresponding icon). You could browse for the Vespa Analysis main.py script now if you want, as you will need this path later.
  3. Enter a name for your Shortcut like “Vespa Analysis”, hit enter.

You now have a shortcut that you can modify …

The following command is all one line. It tells the shortcut to do 4 things, in order. 1) create a Windows cmd.exe window, 2) use a minconda script to activate your Python 2.7 conda environment in the cmd window, 3) run the Vespa Analysis main.py script, and 4) when Analysis quits, exit the cmd window.

%windir%\System32\cmd.exe /k ““D:\Users\bsoher\miniconda2\Scripts\activate.bat” “D:\Users\bsoher\miniconda2\envs\python27” && python “D:\Users\bsoher\miniconda2\envs\python27\Lib\site-packages\vespa\analysis\main.py” && exit”

Paste the above command into a word processor. Let’s parse this line by line, and tell you what you need to change:

%windir%\System32\cmd.exe /k

  • change nothing

"“D:\Users\bsoher\miniconda2\Scripts\activate.bat”

  • change path to where your miniconda install lives

“D:\Users\bsoher\miniconda2\envs\python27”

  • change path to select the conda environment for Python 2.7

python “D:\Users\bsoher\miniconda2\envs\python27\Lib\site-packages\vespa\analysis\main.py”

  • change path to where Vespa is installed, usually under “Lib\site-packages\vespa” in your Py 2.7 directory

Last step, copy the edited command from your text editor into the Shortcut you created. Right click its icon, click Properties. On “Shortcut” tab, delete all text in the Target line, and paste new command text into Target. Click OK and dialog should close. With luck, you can now click on the Shortcut icon and Vespa Analysis will run.

Create new Shortcuts (or copy/paste this first one) and change the Python script that is run to create shortcuts to run Simulation, Pulse, etc.

1 Like

Dear Brian,
thanks for the detailed step by step guide to create your own shortcuts.
I have tried this alternative to solve my problem without positive outcome, unfortunately.
Following the installation at https://scion.duhs.duke.edu/vespa/project/wiki/SimpleInstall, everything runs smoothly and the shortcuts are created automatically as prescribed by the very last prompt line.

Although clicking normally on them does not prompt the software. Shortcuts created with the above reported way do not prompt the software either.

I am running everything on win10 following carefully vespa website’s guidelines, what could be the mistake?

Dear Brian,
after an iterative trials approach I figured how to adapt your suggestion for building up my icons according to my files structure. Weirdly all the problems came from the character " which was not parsed due to the text editor I was using. Funny!

All good, thanks and have a wonderful day

I’m so glad this worked out for .you! I’m still trying to figure out how to generalize this into the basic install. But at least there is now some info about doing it manually

Best,

Brian.