This task content
summary
Type of Starting Condition: How to Set Startup Conditions
Summary You can establish a start condition in the installer solution to terminate the installation and display the message when some criteria exist. This article describes the types of startup conditions that can be specified, and provide an example to show how to set the start condition.
Back to top
The type of start condition can be specified in the Microsoft .NET deployment environment including:
File start condition This condition determines whether there is a file on the target computer. If the conditional setting is false, the installation is terminated. Registry Start Condition This condition determines if there is a registry key on the target computer. If the conditional setting is false, the installation is terminated. Windows Installer Startup Condition This condition determines whether there is a Microsoft Windows installer component on the target computer. If the conditional setting is false, the installation is terminated. .NET Framework start condition This condition determines if a .NET runtime library file is installed on the target computer. If the conditional setting is false, the installation is terminated. Internet Information Service Startup Condition This condition determines whether Microsoft Internet Information Services is installed on the target computer. If the conditional setting is false, the installation is terminated.
Back to top
Example: How to set the start condition The following steps Show how to set the start condition for a certain file based on the target computer.
In the Solution Explorer, select the installer solution. For additional information about how to generate an installer solution for an application, click the article number below to see the article in the Microsoft Knowledge Base: 307353 How to: Create a setup package by Using Visual Studio.net in Solution Resources In the Manager, click the Start Condition icon. Use the start condition editor that appears to specify the conditions required to install on the target computer. In the Start-up condition window, select the "Requirements On A Target" node. In the "Operation" menu, click Add File Launch Condition. This creates a new search ("AppSearch") under the Search Target Computer node and creates a new start condition under the "Startup Condition" node. In order to set the start condition to check if there is a file on the target computer, you must first modify the search attribute to reflect the file you want to search. The search attribute is located under the search target computer node. For additional information about using a search, click the article number below to view the article in the Microsoft Knowledge Base: 307369 How to: Use Appsearch IN .NET Deployment Select a start condition under the Startup Condition node. If you want to modify the message displayed when the start condition is calculated as False, modify it in the Start Condition Properties window. You should also modify the Launch Condition Condition property, which makes the message when the condition is calculated as false. For this example, set this property to File Search. Note: You can modify the start condition condition properties so that it matches the type of start condition to use. For more information, see: Conditional Statement Syntax http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/novr_1ol4.asp To generate a deployment solution, please click Build Generation on the menu.
Back to top
For more information about the start condition, see the Microsoft Windows installer provided by the Web site below:
Http://www.microsoft.com/msdownload/platformsdk/sdkupdate
Back to top
The information in this article applies to:
Microsoft Visual Studio .NET (2002), Professional Edition recently updated: 2003-8-6 (1.0) Keyword KBDeployment Kbhowto KbhowTomaster KB307374 KBAUDDEVELOPER