I created the installer using NSIS. Everything working fine but default icon not setting to the particular files.
WriteRegStr HKCR "Myapp\DefaultIcon" "" "$INSTDIR\Myexe,1"
I need to set default icon by using my Exe
not by using icon file
I created the installer using NSIS. Everything working fine but default icon not setting to the particular files.
WriteRegStr HKCR "Myapp\DefaultIcon" "" "$INSTDIR\Myexe,1"
I need to set default icon by using my Exe
not by using icon file
You need to provide the full path. If you want the first icon in your .exe then you don't need a icon index:
RequestExecutionLevel Admin
Section
WriteRegStr HKCR ".foo" "" "foofile" ; .foo file extension
WriteRegStr HKCR "foofile\DefaultIcon" "" "$INSTDIR\MyApp.exe"
SectionEnd
Other icons need a icon index:
WriteRegStr HKCR "MyProgId\DefaultIcon" "" "$INSTDIR\MyApp.exe,1"