To specify the installation path for component when the installation package is run

Source: Internet
Author: User

The methods described below also apply to the InstallScript MSI project if the ability to dynamically specify the installation path is implemented in the Basic MSI project type.

1. Find the corresponding component in Setup design.

2. Click on the "..." button on the back side of the destination.

3. In the Browse for Directory dialog box, select Destination computer after clicking the right mouse button to select "New Directory", the default parameter is a new_directory1, click OK.

4. Add a New_directory1 attribute to the property manager.

5. Add the following code to the script:

Export prototype Setruntimeproperty (function Setruntimeproperty (HMSI)
STRING szruntimedestination;
Number ncnt;
Begin
Szruntimedestination C:\\kevin Wanmsisetproperty (hmsi,new_directory1,szruntimedestination);

6. Add a CA that binds to the script function Setruntimeproperty.

7. Insert the CA into the user interface sequence, and after placing it in Setupinitialization, set the run condition to: not installed.

8. Compile and run the installation package.

To specify the installation path for component when the installation package is run

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.