diff --git a/build/installer.nsh b/build/installer.nsh index 0c93e80..1b86bf8 100644 --- a/build/installer.nsh +++ b/build/installer.nsh @@ -1,8 +1,13 @@ - !macro preInit - SetRegView 64 - WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\PicGo" - WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\PicGo" - SetRegView 32 - WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\PicGo" - WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\PicGo" - !macroend \ No newline at end of file +!macro customInstall + SetRegView 64 + WriteRegStr HKCR "*\shell\PicGo" "" "Upload pictures w&ith PicGo" + WriteRegStr HKCR "*\shell\PicGo" "Icon" "$INSTDIR\PicGo.exe" + WriteRegStr HKCR "*\shell\PicGo\command" "" '"$INSTDIR\PicGo.exe" "upload" "%1"' + SetRegView 32 + WriteRegStr HKCR "*\shell\PicGo" "" "Upload pictures w&ith PicGo" + WriteRegStr HKCR "*\shell\PicGo" "Icon" "$INSTDIR\PicGo.exe" + WriteRegStr HKCR "*\shell\PicGo\command" "" '"$INSTDIR\PicGo.exe" "upload" "%1"' +!macroend +!macro customUninstall + DeleteRegKey HKCR "*\shell\PicGo" +!macroend