0

Working on the basis of this post (and this follow-up post), I've tried adding a python script (which I've added to the path and so on, so that I can run it from the command line everywhere in the system) to the context menu, but I get a strange error message:

enter image description here

To be clear, I have successfully run this script from the command line (using powershell, in case it matters) in the folder in which I'm trying to run it from the context menu.

For reference, this is the command in the registry:

C:\cmdtools\get_abs.py \"%V\"
  • Please provide a screenshot of the error. – cyfrost May 7 '16 at 14:22
  • I did. It's linked. I don't have enough experience points or whatever to embed the picture. – Marc Adler May 7 '16 at 14:23
  • Can you point out the command you have given in the registry that triggers the launch of the Python script? – cyfrost May 7 '16 at 14:25
  • I'll edit it in above. – Marc Adler May 7 '16 at 14:29
0

I reposted this question to stackoverflow and someone answered it.

tl;dr: the context menu will only run .exe files, so I had to point the command part of the registry entry to python.exe, followed by my script as an argument.

https://stackoverflow.com/questions/37127532/python-script-wont-run-from-the-context-menu

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.