1. Create an installation Project (Setup Project or Web Setup Project)
2. open Launch Conditions Editor
3. Create a Search under the Search Target Machine item, such as file Search
Install SQLXML3.0 as the column, in the search properties page:
(Name): Search for SQLXML
FileName: Microsoft. Data. SQLXml. dll
Folder: [ProgramFileFolder] \ SQLXML 3.0 \ bin
Depth: 0
Property: FILEEXISTS1
Other attributes are empty.
Note: [ProgramFileFolder] is the system's Program Files directory.
If you install SQLXml in another directory, the installer still requires you to install SQLXml. To avoid this error, you can use the registry search method.
4. Create a loading condition under the Launch Conditions item.
On the attributes page of the loading condition:
(Name): Install SQLXML
Condition: FILEEXISTS1
InstallUrl: sqlXml3sp1. msi
Message: Install SQLXML3.0 and then run the installer again.
5. Compile the installer.
Note: The sqlXml3sp1. msi file should be placed in the same directory of the installer. In this way, the installer can call it correctly.
When the installer fails to find the conditions defined in step 1, the installer displays the information set in the Message in step 2. After the user presses "Yes ",
The installer runs sqlXml3sp1. msi. When sqlXml3sp1. msi is running, this installation is complete. However, this installation is not performed.
Therefore, you need to run the installation program 2nd times.