Windows7: Building a Trigger Start Optimized Service

This post discuss ‘how to convert a standard automatic-start service to a trigger-start service in Windows 7’ that starts up only when a certain event occurs in system. We’ll use a WPF application (obviously managed code) that registers and monitors a service (also implemented using .NET). To bridge between .NET world and native Win32 APIs […]

This post discuss ‘how to convert a standard automatic-start service to a trigger-start service in Windows 7’ that starts up only when a certain event occurs in system. We’ll use a WPF application (obviously managed code) that registers and monitors a service (also implemented using .NET). To bridge between .NET world and native Win32 APIs that we saw in previous post, we use a C++/CLI interoperability layer. This sample application has 3 parts: A C++/CLI interoperability layer that provides a regular and easy .NET API to the controller application; A WPF controller application that lets you register and run the service; A simple .NET service that looks for a USB storage device (disk on key) and on it, a specific folder named “ToCopy” from which to copy files to your local “C:\FromUSB” folder

Full Article: Windows blog