[CMake] CPACK_NSIS_EXTRA_PREINSTALL_COMMAND Not Working as Expected
Danoush
danoushh at gmail.com
Tue Sep 11 23:49:48 EDT 2012
Hello,
I have been trying to use the CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS
variable to uninstall a package before a new installation. However I get
some unexpected results. The message box and uninstaller in the
following command are launched after all of the files in the package
have been installed to the target system. From the documentation of
CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS, I was expecting the commands below
to get executed before the files are installed on the target.
SET( CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS "
MessageBox MB_OK 'Starting preinstall command'
ReadRegStr $0 HKLM
\\\"Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Uninstall\\\\${CPACK_PACKAGE_NAME}\\\"
\\\"UninstallString\\\"
ExecWait '$0 _?=$INSTDIR'
")
I would appreciate any insights.
Thanks and Regards,
Dan
More information about the CMake
mailing list