Accidentally changed how a .ghpy file opens, now it opens with notepad

I was having problems with a plugin that wouldnt load and gypython not working so I deleted the grasshopper folder and redownloaded rhino and everything and somehow in all the madness changed a plugin I need, to open with notepad, now it doesnt open in grasshopper… even being in the components folder. Now any grasshopper plugin I download saves as a notepad file even though it still ends with .ghpy and says that is the file type. Im afraid I’ve completely broken grasshopper please help. Is also worth noting that within all this madness I added this into powershell to automatically unblock the files from the compenents file ( dir -Path [directory path] -Recurse | Unblock-File).

Is there a way I can completely reset grasshopper? Can I go back? Im desperate, please.

have you tried right click on the file, “open with” + “Rhino”?

Yes, it pops up on every rhino file I open that the file cant be read by rhino

Hi @spencer269,

The .ghpy file should no more be associated with Rhino than with Notepad. It shouldn’t have any association.

While it is easy to replace one file association with another, the only way to remove a file association completely is to hack the Windows registry. The usual warnings apply: this can trash your system, create a Windows Restore Point first, backup the Registry, if you choose to do this it is your own decision to do so and nobody else is to blame if it goes pear-shaped.

Once you have the precautions in place, run Regedit as System Administrator. Find any Keys named .ghpy, check that they have values (or subkey values) that reference Notepad or Rhino and, where so, delete the .ghpy key. Keep doing this until all are gone. Next look for Values named .ghpy with Notepad or Rhino in the Data and delete those values.

That should do it, so close Regedit and check that Explorer now shows “Open with” for your .ghpy file instead of Open. Then run Rhino and grasshopper and check that the component still works.

If you get any strange effects, you can try running Regedit again and deleting any remaining .ghpy Keys and also any Keys containing ghpy_auto_file .

Needless to say, if you get any serious problems or edit the wrong entries by mistake you should restore your Registry or run System Restore.


NB. If you share your computer with other users, be careful not to edit registry entries relating specifically to them…