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

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to