vitoco
28th November 2006 07:35 UTC
Checkboxes
Components pages in plain installers have a list of sections that could be (un)installed, where the user has to check or uncheck as desired.
Many times, when uninstalling, I had removed exactly the sections I wanted to keep, leaving the unwanted ones :eek:
I guess that this happens because the checkboxes have a "tick" (a positive mark), both when installing and uninstalling.
Is there a simple way to change the ticks in checkboxes of the uninstall component page into a cross ("x" for a negative mark), so this visually means "unwanted" to the user?
Thanks...
bholliger
28th November 2006 09:58 UTC
Hi vitoco!
Yes, this is possible. But it costs a few bytes of installer size and you have to disable the CRCCheck functionality.
Because the installer and the uninstaller share the bitmaps you have to change it after the uninstaller has been created. This can be done with ResHacker.
Download ResHacker http://www.angusj.com/resourcehacker/ and extract ResHacker.exe. Copy this executable to your installer directory.
Add this code to your installer. Right after the code that creates the uninstaller.
; WriteUninstaller "$INSTDIR\Uninstall.exe"
;
InitPluginsDir
File /oname=$PLUGINSDIR\modern-cross.bmp "modern-cross.bmp"
File /oname=$PLUGINSDIR\ResHacker.exe "ResHacker.exe"
ExecWait '"$PLUGINSDIR\ResHacker.exe" -modify $INSTDIR\Uninstall.exe, $INSTDIR\Uninstall.exe, $PLUGINSDIR\modern-cross.bmp, BITMAP, 110,' $0
Introduce
CRCCheck off
at the top of the script.
Before you compile you have to create a crossed version of the Contrib\Graphics\modern.bmp file and save it to the installer's directory.
Hope this works.
Cheers
Bruno
vitoco
29th November 2006 17:11 UTC
Wow, thanks Bruno... pretty clear.
As I'm using Classic UI, the required bitmap is classic-cross.bmp, and already exists in Contrib\Graphics\Checks dir of NSIS.
It should exist UninstallCheckBitmap attribute... :D
++Vitoco
vitoco
29th November 2006 18:24 UTC
It should exist UninstallCheckBitmap attribute...
Added to the
tracker.
kichik
30th November 2006 18:12 UTC
That'd actually be possible since the icon patcher for the uninstaller can handle that as well.
However, the text shown in the uninstaller components page is pretty clear. It says you should select sections you want to remove. You could also name the sections with "Remove" prefix so it'll be even clearer.
vitoco
30th November 2006 20:44 UTC
Unfortunately, users DON'T READ the instructions.
:(