Install and Test Your Service

Copy the tutorials.exe from the bin\Release directory to the c:\temp directory, replacing the Tutorials.exe we created in Chapter 1. Open a Visual Studio Command Prompt window and switch to the c:\temp directory. Type installutil tutorials.exe and press Enter. After the service installs correctly, open the Services control panel utility by clicking Start, clicking Administrative Tools, clicking Control Panel, and then clicking Services. Then start the Tutorials service by right-clicking it and selecting Start. Using the Event Viewer, you will see the events from the <OnStart> and <ThreadFunc> methods. Stop the service and you will now see the event from the <OnStop> method.

Note

In subsequent chapters, I won’t explain ...

Get Programming Windows® Services with Microsoft® Visual Basic® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.