You could probably set up specific pairs of apps to run using the registry, and altering what deals with mimetypes. However another more generic way, and far more complex, is to use the Task Scheduler. The task scheduler can start an app based various types of triggers, including Event Log entries.
So all we need is to ensure an event is created whenever an application starts, and then create a scheduled task to start whenever the event is logged.
Enable 'application start' logging
- Start and enter
secpol.msc
into the Run box
- Navigate to Local Policies/Audit Policy
- Double Click Audit process tracking and enable
Success
Now, if you start any application, if you look in Event Viewer / Security Log you will see a Process Creation event 4688
each time an application is started.
Create scheduled task based on trigger
- Open Task Scheduler and create a new task
- On the General Tab, give the task a name
- On the Triggers tab, create a new trigger, and choose On an event as the trigger
- Choose Custom, and click Edit Event Filter
- Change the Filter settings as follows:
Now Switch to the XML tab, and enable edit query manually
You will see the following
<QueryList>
<Query Id="0" Path="Security">
<Select Path="Security">
*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and Task = 13312 and (band(Keywords,9007199254740992)) and (EventID=4688)]]
</Select>
</Query>
</QueryList>
Now you just need to add the application you want to cause the trigger. For example, this one uses notepad.exe
as the trigger:
<QueryList>
<Query Id="0" Path="Security">
<Select Path="Security">
*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and Task = 13312 and (band(Keywords,9007199254740992)) and (EventID=4688)]]
and
*[EventData[Data[@Name='NewProcessName'] and (Data='C:\Windows\System32\notepad.exe')]]
</Select>
</Query>
</QueryList>
Click Ok
for this, then Ok
to close the trigger dialog box.
Now choose the Action tab, and create a new action, that is Start a Program
, and browse to the app you want to start along with the trigger application.
Can you clarify. The first option is that if you open Chrome, itunes starts too. But the second option - when you click a link that opens itunes, you want something else to open as well? – Paul – 2014-04-23T23:40:38.290
Those are just examples, basically I want to start mutiple programs when I want to start one or another program wants to start it – TheBird956 – 2014-04-23T23:45:42.453