Archive: Checkboxes


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...


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

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


It should exist UninstallCheckBitmap attribute...
Added to the tracker.

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.


Unfortunately, users DON'T READ the instructions.

:(