home *** CD-ROM | disk | FTP | other *** search
-
- <!-- #include virtual="/quickstart/howto/include/header.inc" -->
-
- <h4>How Do I...Create system resources during installation?</h4>
-
- <div class="indent" style="width:660">
-
- <font face="Tahoma" size="1">An application may consist not only of
- traditional program files, but also of associated resources, such as message
- queues, event logs, and performance counters, that must be created on the
- deployment destination. You can configure your application to create these
- resources when you application is installed and to remove them if your
- application is uninstalled, using what are called <span class="Italic">installation
- components</span>.</font>
-
- <p><font face="Tahoma" size="1">This sample illustrates how to build an
- application which will set up its own message queue and its own event log
- during installation and delete those two system resources when the application
- is uninstalled.</font></p>
-
- <p><font face="Tahoma" size="1">Run the following command line to
- install the system resources:</font></p>
-
- <blockquote>
- <p><font face="Courier New" size="2" color="#0000FF">> InstallUtil.exe
- Installers.exe</font></p>
- </blockquote>
-
- <p><font face="Tahoma" size="1">Now, you can verify in the message queueing
- management console that an "InstallersSample" message queue was
- installed. Also, an "InstallersSample" event log source was set up in
- the registry.</font></p>
-
- <p><font face="Tahoma" size="1">To uninstall the message queue and the event
- log source, Run the following command:</font></p>
-
- <blockquote>
- <p><font face="Courier New" size="2" color="#0000FF">>InstallUtil.exe /u
- Installers.exe</font></p>
- </blockquote>
-
- <p><font face="Tahoma" size="1">How does it work? The InstallUtil.exe will
- search, using Reflection mechanism, all assemblies passed as the command line
- arguments for classes inheriting from Installer class and with
- RunInstallerAttribute set to true. The Installers then handle the install and
- uninstall actions. </font>
-
- </div>
-
- <h4>Example</h4>
- <p>
- <div class="indent">
- <a target="_blank" href="/quickstart/howto/samples/Services/Installers/Installers"><img style="border-color:black" border="1" src="/quickstart/images/genicon.gif"><br>
- </a>
- <div class="caption">
- Installers.exe
- </div>
- <br>
- [<a target="_blank" href="/quickstart/howto/samples/Services/Installers/Installers">View
- Sample</a>] | [<a target="_blank" href="/quickstart/util/srcview.aspx?path=/quickstart/howto/samples/Services/Installers/Installers/Installers.src">View
- Source</a>]
- <p>
- </div>
- <h4>Source Code</h4>
- <div class="code">
- <xmp>
- <!-- #include virtual="/quickstart/howto/samples/Services/Installers/Installers/Installers.cs" -->
- </xmp>
- </div>
- <!-- #include virtual="/quickstart/howto/include/footer.inc" -->
-