Jump to content

Recommended Posts

Posted

Hi All,

We have Python installed on our ICT machines (all running Win10 X64). However, with the advent of a new A Level ICT course being taught we have had to install other software that has added to the versions of Python on these systems. Now, when a *.Py file is right clicked, we get at least two and sometimes three "edit with IDLE" options on the context menu. The A Level teacher has asked me to remove the options for all Python versions except 3.4.3.

There are at least 25 computers to sort out and I know it's a registry change but I'm hoping there is an easy way to apply the change to all the machines as a blanket fix that will run on all of them whether or not they have the issue. If not I am going to have to logon to each one manually and make the changes.

 

This may not even be the correct forum for this question but I thought I'd try here first as readers may have more specific Python knowledge and I may get a quicker answer ;)

TIA

Mark P.

Posted

Yup we have at least two versions installed and in some cases three. All I want to do is remove the unneeded context menu entries.

As to why the old version? That is what the school asked for. Apparently 3.4.3 is needed for the curriculum. Mine is not to reason why....

I need to find a way to do this on all 25 computers without visiting each one...

Posted

OK - update.

Can't uninstall the old versions as apparently there are some things they need them for (?)

Tried replacing the part of the registry on the machines with the problem with the same part of the registry on those that don't. No idea why but it didn't work. The machines that I manually resolved are fine. Those that I haven't still have two or three different menu options.

 

The working reg entry is:

Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Python.File]@="Python File"[HKEY_CLASSES_ROOT\Python.File\DefaultIcon]@="C:\\Python27\\DLLs\\py.ico"[HKEY_CLASSES_ROOT\Python.File\shell][HKEY_CLASSES_ROOT\Python.File\shell\editwithidle]"MUIVerb"="&Edit with IDLE""Subcommands"=""[HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell][HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell\edit34]"MUIVerb"="Edit with IDLE 3.4.3"[HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell\edit34\command]@=""C:\\python34\\python.exe" -m idlelib "%L" %*"[HKEY_CLASSES_ROOT\Python.File\shell\open][HKEY_CLASSES_ROOT\Python.File\shell\open\command]@=""C:\\Python27\\python.exe" "%1" %*"[HKEY_CLASSES_ROOT\Python.File\shellex][HKEY_CLASSES_ROOT\Python.File\shellex\DropHandler]@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"

An example of one that isn't correct is

 

Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Python.File]@="Python File"[HKEY_CLASSES_ROOT\Python.File\DefaultIcon]@="C:\\Python27\\DLLs\\py.ico"[HKEY_CLASSES_ROOT\Python.File\shell][HKEY_CLASSES_ROOT\Python.File\shell\Edit with IDLE][HKEY_CLASSES_ROOT\Python.File\shell\Edit with IDLE\command]@=""C:\\Python27\\pythonw.exe" "C:\\Python27\\Lib\\idlelib\\idle.pyw" -e "%1""[HKEY_CLASSES_ROOT\Python.File\shell\editwithidle]"MUIVerb"="&Edit with IDLE""Subcommands"=""[HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell][HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell\edit37]"MUIVerb"="Edit with IDLE 3.7 (64-bit)"[HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell\edit37\command]@=""C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python37_64\\pythonw.exe" -m idlelib "%L" %*"[HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell\edit37-32]"MUIVerb"="Edit with IDLE 3.7 (32-bit)"[HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell\edit37-32\command]@=""C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python37_86\\pythonw.exe" -m idlelib "%L" %*"[HKEY_CLASSES_ROOT\Python.File\shell\open][HKEY_CLASSES_ROOT\Python.File\shell\open\command]@=""C:\\Python27\\python.exe" "%1" %*"[HKEY_CLASSES_ROOT\Python.File\shellex][HKEY_CLASSES_ROOT\Python.File\shellex\DropHandler]@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"

 

My GPO is supposed to replace the latter with the former but it hasn't. Is there another way to do it?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...