Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
programming4us
Windows 7

Advanced Windows 7 Programming : Working in the Background - DEVELOPING TRIGGER-START SERVICES (part 7)

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
3/8/2014 8:30:44 PM
5.3. Performing the Telnet Test

At this point, you have Telnet installed and configured, and the service is installed and configured. Follow these steps to test the functionality of the trigger-start service:

  1. Open the Event Viewer console in the Administrative Tools folder of the Control Panel. You'll see the Event Viewer window.

  2. Open the Event Viewer\Windows Logs folder.

  3. Right-click the System log entry and choose Clear Log from the Context menu. You'll see an Event Viewer dialog box.

  4. Click Clear to clear the events in the Event Viewer.

  5. Open the Services console in the Administrative Tools folder of the Control Panel. Right-click the Telnet entry and choose Start from the Context menu. The Telnet service will start. Starting the Telnet service opens Port 23. You can verify this fact by typing NetStat –a at the command prompt and pressing Enter. The NetStat utility shows that the system is listening on Port 23, as shown in Figure 11. (Notice the 0.0.0.0:23 address entry on the first line of the output — the :23 part of the entry signifies Port 23.)

  6. Wait at least 60 seconds. Windows doesn't guarantee that a trigger-start service will respond immediately to an event. In fact, you'll find that the documentation makes a vague reference to a 60-second response time, but Microsoft never makes it very clear. Depending on system load, a trigger-start service may not even respond within 60 seconds, but it will respond.

  7. Choose Action => Refresh. You'll see that TriggerStartService has started. It will remain started as long as the Telnet service is running, as shown in Figure 12.

    Figure 11. Use the NetStat utility to determine when a particular port is open.
    Figure 12. Windows starts TriggerStartService as needed to respond to port events.
  8. Right-click the Telnet service and choose Stop from the Context menu. The Telnet service will stop. Verify that Port 23 is no longer open by typing NetStat –a at the command prompt and pressing Enter.

  9. Wait at least 60 seconds.

  10. Choose Action => Refresh. You'll see that TriggerStartService has stopped.

  11. In the Event Viewer, make sure the System log is selected and choose Action Refresh. You'll see a series of event log entries like those shown in Figure 1.

    Figure 13. The exercise you just completed creates a number of event log entries.
  12. Beginning with the oldest entry, view the entries one at a time. You'll see the sequence of events that you've just tested with this procedure. The event log will tell you that Telnet started, then TriggerStartService. One of the entries will tell you that Port 23 has opened. Keep following the entries, and you'll eventually see one where Port 23 closes after the Telnet service stops. Notice that the trigger-start service starts and stops as the port opens and closes, but that Windows doesn't act immediately — the action always requires some amount of time.

At this point, you might want to uninstall TriggerStartService. To perform this task, type InstallUtil /U TriggerStartService.EXE and press Enter.

Other -----------------
- Advanced Windows 7 Programming : Working in the Background - ADVANTAGES OF WORKING IN THE BACKGROUND
- Microsoft Visio 2010 : Importing Graphics (part 6) - Importing AutoCAD Drawings - Manipulating an Imported AutoCAD Drawing and Adding Furniture
- Microsoft Visio 2010 : Importing Graphics (part 5) - Importing AutoCAD Drawings - Inserting an AutoCAD File
- Microsoft Visio 2010 : Importing Graphics (part 4) - Adding Excel Charts to Your Diagrams, Importing Vector Graphics
- Microsoft Visio 2010 : Importing Graphics (part 3) - Adding Clip Art to Your Diagrams
- Microsoft Visio 2010 : Importing Graphics (part 2) - Using Images as Shapes in Visio - Handling Bitmaps and Jaggies
- Microsoft Visio 2010 : Importing Graphics (part 1) - Using Images as Shapes in Visio - Working with Images
- Microsoft Visio 2010 : Using Special Shape Features (part 2) - Control Handles , Hyperlinks, Action Tags
- Microsoft Visio 2010 : Using Special Shape Features (part 1) - Right-Click Actions,Shape Data Fields
- Microsoft Visio 2010 : Working with Text (part 3) - Text Resizing Behavior
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server