I believe I have successfully registered my extension. The program shows up as the default for the .myFileExtension in the Control Panel Programs, shows the icon correctly for the file, and shows up in the list of "open with" programs. When I double click the file, it seems like it's trying to open something, but then doesn't like it can't find the exe or something. Here is my code. I have both HKCR and HKCU due to googling over and over again trying to see if admin privileges was the problem, but it wasn't. Any suggestions would be super helpful.
*In the installation*
WriteRegStr HKCR ".myFileExtension" "" "MyProgramName"
WriteRegStr HKCR "MyProgramName\Shell\open\command" "" '"$INSTDIR\MyProgramName.exe" "%1"'
WriteRegStr HKCU ".myFileExtension" "" "MyProgramName"
WriteRegStr HKCU "MyProgramName\Shell\open\command" "" '"$INSTDIR\MyProgramName.exe" "%1"'
*In the uninstallation*
DeleteRegKey HKCR ".myFileExtension"
DeleteRegKey HKCR "MyProgramName\Shell\open\command"
DeleteRegKey HKCU ".myFileExtension"
DeleteRegKey HKCU "MyProgramName\Shell\open\command"
NSIS File Extension Association Open Command Problems
2 posts
Is ".myFileExtension" actually a unique extension or something common that other programs might register?
The install part looks OK to me. What happens if you change "$INSTDIR\MyProgramName.exe" to "$WinDir\Notepad.exe"?
The uninstaller should not delete ".myFileExtension" if it does not point to "MyProgramName".
You can monitor Registry and Filesystem operations with Process Monitor. This will show you if it finds the program.
The install part looks OK to me. What happens if you change "$INSTDIR\MyProgramName.exe" to "$WinDir\Notepad.exe"?
The uninstaller should not delete ".myFileExtension" if it does not point to "MyProgramName".
You can monitor Registry and Filesystem operations with Process Monitor. This will show you if it finds the program.