The Windows registry is not something you should edit if you don’t know what you’re doing, or if you don’t know how to back up the various entries you want to edit. In fact, even if you know your way around the registry, a backup is still necessary because if something goes wrong, recovering from it can be tricky. If you’re trying to open a file, and you see the ‘Invalid value for registry’ error message, it means that there’s something wrong in the registry. Of course the message doesn’t tell you what’s wrong but here’s the fix.
Fix Invalid value for registry
This error appears for certain file formats. It is not going to appear for all files. Pay close attention to which file format the error appears for. What’s happened is that the registry entry that tells Windows 10 which app to use to open that file format is corrupted.
Fixing it is easy. Make sure you have at least one app installed on your system that can open the file type. Right-click the file, and select the Open With option from the context menu. Do not select any apps from the sub-menu. Instead, click the ‘Choose another app’ option.
In the menu that opens, select the app that you want to use to open the file and make sure you select the ‘Always use this app to open [file extension] files’. Click OK. The file will open and any other file of that particular type that you try to open will open without any problems. The error message will go away.
For any other file types that you have this problem with, repeat the above process. While it is unlikely, if you happen to get this error for lots of files of a particular type e.g., image files, and you don’t want to do this on a per-file-extension basis, you can install an app that lets you set file associations during installation.
Take for example IrfanView. When you install it, it asks if you want the app to be used to open all supported formats. When you make the change during installation, it fixes the problems in the registry.
If the file type is a less common one, you will need to figure out which app can set defaults for it during installation. If you can’t find one, the longer route is the way to go. It’s time consuming but it fixes the problem. As for the cause to this problem, it’s anyone’s guess but I had to deal with it after updating Windows 10 which is often the cause of problems like this.