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

Comments

Please log in to comment

Answers

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.
Answered 07/20/2015 by: EdT
Red Belt

  • 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.
Please log in to comment
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.
Answered 07/20/2015 by: EdT
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity