!macro customInstall
  ; Register imexmedia protocol
  WriteRegStr HKCR "imexmedia" "" "URL:ImEX Shop Partner Protocol"
  WriteRegStr HKCR "imexmedia" "URL Protocol" ""
  WriteRegStr HKCR "imexmedia\\shell" "" ""
  WriteRegStr HKCR "imexmedia\\shell\\open" "" ""
  WriteRegStr HKCR "imexmedia\\shell\\open\\command" "" '"$INSTDIR\ShopPartner.exe" "%1"'
!macroend

!macro customUnInstall
  ; Remove imexmedia protocol
  DeleteRegKey HKCR "imexmedia"
!macroend