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