 2002 Visual Studio Magazine 
Fawcette Technical Publications

Issue: October 2002
Section: Create Windows Services
Author: Gerardo Villeda
Filename: vs0210gv

You can find Listings 1, 2, and 3 in the listings.txt file.

The sample for this windows service component contains 3 different projects:
 + VSMFileServiceUI      Contains the user interface for the service to 
                         simplify debugging. You should start loading the 
                         solution stored in this folder

 + VSMFileService        Contains the code for the Windows service including 
                         a copy of the main form also available in the
                         VSMFileServiceUI project listed above.

 + VSMFileServiceSetup   Contains the Windows Installer setup project used
                         to install the application on its final destination

To setup the service: 
 + Build the VSMFileServiceUI solution (Ctrl-Shift-B)

 + Run the Windows installed package located @
   .\VSMFileServiceSetup\Debug\VSMFileServiceSetup.msi

 + Accept all defaults when the application installs

 + From the Services applet in the Control Panel, open the Properties
   window for the newly installed service. 
   + Click on the Log On tab
   + Make sure that the Local System Account is selected
   + Check the "Allow service to interact with desktop" checkbox.
 
 + You can now start and stop the service
