aboutsummaryrefslogtreecommitdiff
path: root/src/samples/Dtf/Documents/Guide/Content/samplecas.htm
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-07-14 15:19:53 -0700
committerRob Mensching <rob@firegiant.com>2022-07-14 16:02:24 -0700
commit229242cf7c328b89b5aa65ed7a04e33c8b93b393 (patch)
treede0a9547e73e46490b0946d6850228d5b30258b8 /src/samples/Dtf/Documents/Guide/Content/samplecas.htm
parentf46ca6a9dce91607ffc9855270dd6998216e1a8b (diff)
downloadwix-229242cf7c328b89b5aa65ed7a04e33c8b93b393.tar.gz
wix-229242cf7c328b89b5aa65ed7a04e33c8b93b393.tar.bz2
wix-229242cf7c328b89b5aa65ed7a04e33c8b93b393.zip
Rename "samples" segment to "tools"
This segment is a bit of a "miscellaneous section" in the WiX repo. As such it has been difficult to name. I originally eschewed the name "tools" because what is in the "wix" segment was once called "tools". However, now that wix.exe is firmly established as the entry point for WiX operations, I've become comfortable with its segment being named "wix". That meant "tools" was again available and "tools" better describes the content of this section.
Diffstat (limited to 'src/samples/Dtf/Documents/Guide/Content/samplecas.htm')
-rw-r--r--src/samples/Dtf/Documents/Guide/Content/samplecas.htm84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/samples/Dtf/Documents/Guide/Content/samplecas.htm b/src/samples/Dtf/Documents/Guide/Content/samplecas.htm
deleted file mode 100644
index 4dfed6f0..00000000
--- a/src/samples/Dtf/Documents/Guide/Content/samplecas.htm
+++ /dev/null
@@ -1,84 +0,0 @@
1<html xmlns="http://www.w3.org/1999/xhtml">
2<head>
3 <title>Sample C# Custom Action</title>
4 <link rel="stylesheet" type="text/css" href="../styles/presentation.css" />
5 <link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" />
6</head>
7
8<body>
9
10 <div id="control">
11 <span class="productTitle">Deployment Tools Foundation</span><br />
12 <span class="topicTitle">Sample C# Custom Action</span><br />
13 <div id="toolbar">
14 <span id="chickenFeet">
15 <a href="using.htm">Development Guide</a> &gt;
16 <a href="managedcas.htm">Managed CAs</a> &gt;
17 <a href="writingcas.htm">Writing CAs</a> &gt;
18 <span class="nolink">C# Sample</span>
19 </span>
20 </div>
21 </div>
22 <div id="main">
23 <div id="header">
24 </div>
25 <div class="summary">
26
27 <p>MSI custom actions are MUCH easier to write in C# than
28 in C++!</p><pre><font face="Consolas, Courier New"> [CustomAction]
29 <font color=blue>public</font> <font color=blue>static</font> ActionResult SampleCustomAction1(Session session)
30 {
31 session.Log(<font color="purple">"Hello from SampleCA1"</font>);
32
33 <font color=blue>string</font> testProp = session[<font color="purple">"SampleCATest"</font>];
34 <font color=blue>string</font> testProp2;
35 testProp2 = (<font color="blue">string</font>) session.Database.ExecuteScalar(
36 <font color="purple">"SELECT `Value` FROM `Property` WHERE `Property` = 'SampleCATest'"</font>);
37
38 <font color=blue>if</font>(testProp == testProp2)
39 {
40 session.Log(<font color="purple">"Simple property test passed."</font>);
41 <font color=blue>return</font> ActionResult.Success;
42 }
43 <font color=blue>else</font>
44 <font color=blue>return</font> ActionResult.Failure;
45 }
46 </font></pre>
47 <p>A sample CA project with two CAs is included in the
48 Samples\ManagedCA directory.&nbsp; Running the CustomActionTest project will package the CA and insert
49 it into a test MSI. The MSI will invoke the custom actions, but it will not install anything
50 since the second sample CA returns ActionResult.UserExit.
51 </p>
52
53 <p><br/></p>
54 <p><b>See also:</b></p>
55 <ul>
56 <li><a href="writingcas.htm">Writing Managed Custom Actions</a></li>
57 <li><a href="caconfig.htm">Specifying the Runtime Version</a></li>
58 <li><a href="databases.htm">Working with MSI Databases</a></li>
59 <li><a href="buildingcas.htm">Building Managed Custom Actions</a></li>
60 <li><a href="debuggingcas.htm">Debugging Managed Custom Actions</a></li>
61 </ul>
62 <p><br/></p>
63
64 </div>
65
66 <div id="footer">
67 <p />
68 Send comments on this topic to <a id="HT_MailLink" href="mailto:wix-users%40lists.sourceforge.net?Subject=Deployment Tools Foundation Documentation">
69 wix-users@lists.sourceforge.net</a>
70
71 <script type="text/javascript">
72 var HT_mailLink = document.getElementById("HT_MailLink");
73 var HT_mailLinkText = HT_mailLink.innerHTML;
74 HT_mailLink.href += ": " + document.title;
75 HT_mailLink.innerHTML = HT_mailLinkText;
76 </script>
77
78 <p />
79
80 </div>
81 </div>
82
83</body>
84</html>