15.02.2015 Views

C# 4 and .NET 4

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

426 ❘ ChaPTer 17 deplOyment<br />

Because the action is code that you develop outside the deployment project, you have the freedom to add<br />

just about anything that adds a professional touch to your application. The thing to remember is that such<br />

an action happens after the phase it is associated with is complete. If you select the Install phase, the action<br />

will not execute until after the install phase has completed. If you want to make determinations before the<br />

process, you will want to create a launch condition.<br />

launch Conditions editor<br />

The Launch Conditions editor allows you to specify that certain conditions must be met before installation<br />

can continue. Launch conditions are organized into types of conditions. The basic launch conditions are<br />

File Search, Registry Search, <strong>and</strong> Windows Installer Search. When the editor is first started you see two<br />

groups (see Figure 17-5): Search Target Machine <strong>and</strong> Launch Conditions. Typically, a search is conducted,<br />

<strong>and</strong>, based on the success or failure of that search, a condition is executed. This happens by setting the<br />

Property property of the search. The Property property can be accessed by the installation process. It can<br />

be checked in the Condition property of other actions, for example. You can also add a launch condition<br />

in the editor. In this condition, you set the Condition property to the value of the Property property in<br />

the search. In the condition, you can specify a URL that will download the file, registry key, or installer<br />

component that was being searched for. Notice in Figure 17-5 that a .<strong>NET</strong> Framework condition is<br />

added by default.<br />

figure 17-5<br />

File Search will search for a file or type of file. You can set many different file-related properties that<br />

determine how files are searched, including filename, folder location, various date values, version<br />

information, <strong>and</strong> size. You can also set the number of subfolders that are searched.<br />

Registry Search allows you to search for keys <strong>and</strong> values. It also allows you to set the root key for searching.<br />

Windows Installer Search looks for the specified Installer component. The search is conducted by GUID.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!