| Version 1.5 December 1 2010 1.2 MB EXE |
|
|
|
Service Triggers (aka Trigger-Start Services), introduced in Windows 7 and Windows Server 2008 R2, allow services to be started and stopped when certain conditions are met.
Triggers can be managed with the venerable SC command-line utility, already used to control windows services. This page presents the trigger-related syntax of the SC command on Windows 7.
Configuring TriggersTriggers can be added, edited or removed using the sc triggerinfo command:
C:\>sc triggerinfo DESCRIPTION: Changes the trigger parameters of a service. USAGE: sc Example: Stopping a service when a machine policy changesTo start the Fax service when a machine policy changes:
C:\Windows\system32>sc triggerinfo "Fax" start/machinepolicy [SC] ChangeServiceConfig2 SUCCESS Querying Trigger Parameters
Use sc triggerinfo to see how a service is configured:
C:\>sc qtriggerinfo
DESCRIPTION:
Retrieves the trigger information of a service.
USAGE:
sc
ExampleHere is the trigger information for the Computer Browser service, which maintains an updated list of computers on the network and supplies this list to computers:
C:\>sc qtriggerinfo browser
[SC] QueryServiceConfig2 SUCCESS
SERVICE_NAME: browser
START SERVICE
FIREWALL PORT EVENT : b7569e07-8421-4ee0-ad10-86915afdad09 [PORT OPEN]
DATA : 139;TCP;System;
DATA : 137;UDP;System;
DATA : 138;UDP;System;
STOP SERVICE
FIREWALL PORT EVENT : a144ed38-8e12-4de4-9d96-e64740b1a524 [PORT CLOSE]
DATA : 139;TCP;System;
DATA : 137;UDP;System;
DATA : 138;UDP;System;
|
Service Trigger EditorDownload
Our customers include...
| |||||||