Windows icon for Windows 11 Installed Apps and Classic Control Panel

I have an icon for the shortcut and for the application window (an .ico file) which is used when minimized, added as a resource.

However, my application does not have an icon for Windows 11’s Settings->Installed Apps listing or its Classic Control Panel. Does anyone know how can I add one with cmake?

I am using the NSIS installer, with the following code:

set(CPACK_GENERATOR NSIS) # ZIP

set(CPACK_NSIS_MUI_ICON ${ROOT_DIR}/etc/Windows/mrv2.ico)
set(CPACK_NSIS_MUI_UNICON ${ROOT_DIR}/etc/Windows/mrv2.ico)

The icon shows in the .exe installer just fine, but not in Windows 11’s Settings->App->Installed Apps.

Is there any way (NSIS code) or requirements I need to make this work?

I think you’re missing CPACK_NSIS_INSTALLED_ICON_NAME. Set it to the relative path to your installed application’s executable. Eg

set(CPACK_NSIS_INSTALLED_ICON_NAME bin/MainApp.exe)
1 Like

Thanks! I actually figured it out with the help of Bing’s ChatGPT.