;Store shortcuts folder
WriteRegStr HKCU "Software\${PRODUCT_SHORT_NAME}\" "lnk" $SMPROGRAMS\$StartMenuFolder
+ WriteRegStr HKCU "Software\${PRODUCT_SHORT_NAME}\" "bat-lnk" $DESKTOP\${PRODUCT_SHORT_NAME}.lnk
;
; the bat we need
rm_instdir_true:
RMDir /r /rebootok "$INSTDIR"
rm_instdir_false:
+
;
- ; Links
- Delete /rebootok "$DESKTOP\${PRODUCT_SHORT_NAME}.lnk"
+ ; Desktop link
+ ReadRegStr $0 HKCU Software\${PRODUCT_SHORT_NAME} "bat-lnk"
+ StrCmp $0 0 +1 +3
+ MessageBox MB_OK "Invalid path to a bat-lnk file, aborting"
+ Abort
+ IfFileExists $0 +3 +1
+ MessageBox MB_OK "No bat-lnk files found, aborting."
+ Abort
+ MessageBox MB_YESNO "The following file will be deleted$\n$0" IDYES rm_batlinks_true IDNO rm_batlinks_false
+ rm_batlinks_true:
+ Delete /rebootok "$0"
+ RMDir "$0"
+ rm_batlinks_false:
+
;
; Start menu folder
ReadRegStr $0 HKCU Software\${PRODUCT_SHORT_NAME} "lnk"
Delete /rebootok "$0\*"
RMDir "$0"
rm_links_false:
- DeleteRegKey /ifempty HKCU "Software\${PRODUCT_SHORT_NAME}"
+ DeleteRegKey /ifempty HKCU "Software\${PRODUCT_SHORT_NAME}"
SectionEnd
;