locked
can't change my .py files default program from cmd to notepad RRS feed

  • Question

  • .py extension is bringing up the cmd and I can't change it anywhere.  I go to "default programs" in the start menu, then "associate file type..." and when I try to change the .py to anything other then "cmd.exe" the computer just acts like nothing happened.  Every thing else can be changed it is just the .py extension and I am the administrator
    Sunday, September 6, 2009 9:16 AM

Answers

  • Hi,

     

    Please find the following key in Regedit:


    Note: Please backup any key before edit incase we did anything wrong by mistake.
     

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py\UserChoice

     

    Find the value named "Progid" in right list, click Delete key to delete it.

     

    If we encountered an "Access is Denied" error, right click on the UserChoice key, choose Permissions --- Advanced. In permission tab, check if there is an entry says "Deny" in Type. If so, highlight that line and click Remove to delete it. Here is an example.

      

    Then test to delete the key again.

     

    If it will still be started by CMD.exe, let's delete all the following keys:

     

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.py

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py

    HKEY_CURRENT_USER\Software\Classes\.py

     

    Then try to start a ".PY" file again. It should ask for a program to open it. Let's choose Notepad this time.

    Monday, September 7, 2009 10:00 AM

All replies

  • Hi,

     

    Please find the following key in Regedit:


    Note: Please backup any key before edit incase we did anything wrong by mistake.
     

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py\UserChoice

     

    Find the value named "Progid" in right list, click Delete key to delete it.

     

    If we encountered an "Access is Denied" error, right click on the UserChoice key, choose Permissions --- Advanced. In permission tab, check if there is an entry says "Deny" in Type. If so, highlight that line and click Remove to delete it. Here is an example.

      

    Then test to delete the key again.

     

    If it will still be started by CMD.exe, let's delete all the following keys:

     

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.py

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py

    HKEY_CURRENT_USER\Software\Classes\.py

     

    Then try to start a ".PY" file again. It should ask for a program to open it. Let's choose Notepad this time.

    Monday, September 7, 2009 10:00 AM
  • Deleting the UserChoice key worked perfectly thank you for the help, much appreciated. I should start reading up on the windows registry
    Saturday, September 19, 2009 5:09 AM
  • hey...

    im having a big prob, by mistake i opend an exe file using notepad, now all the programs i try 2 open get opend in the same way. and as a result thy dnt really open up since it just opens in the notepad. plz help me!! it would be a great help!!

    Monday, July 26, 2010 6:06 PM