CPack/NSIS: generated package fails when uninstalling old package
I've noticed on a new(ish) development machine that packages I generate fail when trying to uninstall old versions of themselves (ie. CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL). You can however uninstall them manually through Windows Add/Remove programs, but that defeats the purpose and convenience.
I've made up a fairly minimal test case by just removing my actual project and leaving the CPACK related stuff.
What I've noticed is that by downgrading (I had an old copy of CMake 3.5 x86 lying) around, the problem went away. However on 3.22.0 and 3.22.1 I see the problem. I tried both 64bit and 32bit installers of 3.22.1 (thinking it might shake something loose as only 32bit installs were available back in the CMake 3.5 days, but to no avail).
My environment is Windows 10, NSIS 3.08 (and also 3.05 prior to upgrading it), and CMake 3.22.1.