Figure 2. Send a Parameter to Your Windows Service.
Use the Properties page of the AppMonitor service to send parameters to the service on startup. In the AppMonitor example, you use this parameter to specify C:\Windows\Monitor.txt as the location for the log file used in the service.