/build/static/layout/Breadcrumb_cap_w.png

How to limit installation path in MSI INstaller (VS2005 Setup project)

Hello

I am creating MSI installer using VS2005 Setup project,

please suggest how to limit length of installation path (for example 170) and display an appropriate message.

Thank You


0 Comments   [ + ] Show comments

Answers (2)

Posted by: EdT 9 years ago
Red Belt
0
Create a custom action that checks the length of the installation path property and exits using a Type 17 custom action with an appropriate error message. Sequence it in the UI sequence after the dialog which gets the information from the user.  You should also consider a similar check in the Execute sequence, to run only if the UI sequence does not run (ie use the UILevel property as a condition) so that the installation can also be terminated if the MSI is run silently.

Comments:
  • Thank you very much for your response.

    To check the length of installation path, I have added C++ dll in custom action under Install but custom action displays message after "Installation confirmation" screen at the time of installation.
    and I have returned error code ERROR_INSTALL_USEREXIT, by this installation terminated.
    And in case returning ERROR_SUCCESS installation continues.
    I need to achieve the following:
    1. Displays the message to user just after it clicks the next button on "Select Installation Folder" screen.
    2. By pressing the OK button from the message box, again the "Select Installation Folder" screen will displays and Installation will not be terminated or resumed, installation processing will be done after the user changes the installation path and press the next button. - programmer1983 9 years ago
Posted by: EdT 9 years ago
Red Belt
0
As a programmer, does the solution not leap out at you?
Replace the user dialog in the MSI that asks for path length and replace it with your own custom action. Your code can then loop around as much as necessary until the user enters a valid string and then set a PUBLIC property with the path. If the user quits, exit with a value in your public property that a terminate installation custom action can use as a condition to terminate the install with an appropriate message.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ