How to start a program when another one is started
I want a program to start each time another one is starting.
Here's an example: Each time I start Google Chrome, I would like iTunes to start at the same time.
Also, I want it to start when I click a link in my browser that starts a program (like "view in iTunes on the iTune website).
I do not want to have to do with a .bat file.
I am running on Windows 7
windows-7 windows
add a comment |
I want a program to start each time another one is starting.
Here's an example: Each time I start Google Chrome, I would like iTunes to start at the same time.
Also, I want it to start when I click a link in my browser that starts a program (like "view in iTunes on the iTune website).
I do not want to have to do with a .bat file.
I am running on Windows 7
windows-7 windows
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
Apr 23 '14 at 23:40
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
Apr 23 '14 at 23:45
add a comment |
I want a program to start each time another one is starting.
Here's an example: Each time I start Google Chrome, I would like iTunes to start at the same time.
Also, I want it to start when I click a link in my browser that starts a program (like "view in iTunes on the iTune website).
I do not want to have to do with a .bat file.
I am running on Windows 7
windows-7 windows
I want a program to start each time another one is starting.
Here's an example: Each time I start Google Chrome, I would like iTunes to start at the same time.
Also, I want it to start when I click a link in my browser that starts a program (like "view in iTunes on the iTune website).
I do not want to have to do with a .bat file.
I am running on Windows 7
windows-7 windows
windows-7 windows
asked Apr 23 '14 at 23:33
TheBird956TheBird956
1601210
1601210
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
Apr 23 '14 at 23:40
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
Apr 23 '14 at 23:45
add a comment |
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
Apr 23 '14 at 23:40
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
Apr 23 '14 at 23:45
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
Apr 23 '14 at 23:40
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
Apr 23 '14 at 23:40
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
Apr 23 '14 at 23:45
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
Apr 23 '14 at 23:45
add a comment |
1 Answer
1
active
oldest
votes
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:WindowsSystem32notepad.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.
I dont have anything named secpol.msc. I made a small reserach and I think its because it is not available in Windows 7 Home Premium. Is there another way?
– TheBird956
Apr 24 '14 at 2:30
The audit policy needs to be changed for this to work, and it is absent from W7HP. There are a few guides out there for installing gpedit.msc on W7HP which you might want to try. You can edit the audit policy with this too, inComputer Configuration/Windows Settings/Security Settings/Audit Policy
– Paul
Apr 24 '14 at 3:19
@TheBird956 Did you manage to get it to work?
– Paul
Jul 3 '14 at 8:09
I do not have the correct windows version. I think I need Pro to do that, but I tried on my brother's computer who has Pro installed and it works.
– TheBird956
Jul 3 '14 at 22:44
To set the trigger to program/process exit/termination/close instead of start/create, this XML for the event filter worked for me:<QueryList> <Query Id="0" Path="Security"> <Select Path="Security"> *[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and (band(Keywords,9007199254740992)) and (EventID=4689)]] and *[EventData[(Data='PATH TO THE DESIRED EXE')]] </Select> </Query> </QueryList>
– V. Rubinetti
Oct 25 '17 at 21:47
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f745318%2fhow-to-start-a-program-when-another-one-is-started%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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:WindowsSystem32notepad.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.
I dont have anything named secpol.msc. I made a small reserach and I think its because it is not available in Windows 7 Home Premium. Is there another way?
– TheBird956
Apr 24 '14 at 2:30
The audit policy needs to be changed for this to work, and it is absent from W7HP. There are a few guides out there for installing gpedit.msc on W7HP which you might want to try. You can edit the audit policy with this too, inComputer Configuration/Windows Settings/Security Settings/Audit Policy
– Paul
Apr 24 '14 at 3:19
@TheBird956 Did you manage to get it to work?
– Paul
Jul 3 '14 at 8:09
I do not have the correct windows version. I think I need Pro to do that, but I tried on my brother's computer who has Pro installed and it works.
– TheBird956
Jul 3 '14 at 22:44
To set the trigger to program/process exit/termination/close instead of start/create, this XML for the event filter worked for me:<QueryList> <Query Id="0" Path="Security"> <Select Path="Security"> *[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and (band(Keywords,9007199254740992)) and (EventID=4689)]] and *[EventData[(Data='PATH TO THE DESIRED EXE')]] </Select> </Query> </QueryList>
– V. Rubinetti
Oct 25 '17 at 21:47
add a comment |
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:WindowsSystem32notepad.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.
I dont have anything named secpol.msc. I made a small reserach and I think its because it is not available in Windows 7 Home Premium. Is there another way?
– TheBird956
Apr 24 '14 at 2:30
The audit policy needs to be changed for this to work, and it is absent from W7HP. There are a few guides out there for installing gpedit.msc on W7HP which you might want to try. You can edit the audit policy with this too, inComputer Configuration/Windows Settings/Security Settings/Audit Policy
– Paul
Apr 24 '14 at 3:19
@TheBird956 Did you manage to get it to work?
– Paul
Jul 3 '14 at 8:09
I do not have the correct windows version. I think I need Pro to do that, but I tried on my brother's computer who has Pro installed and it works.
– TheBird956
Jul 3 '14 at 22:44
To set the trigger to program/process exit/termination/close instead of start/create, this XML for the event filter worked for me:<QueryList> <Query Id="0" Path="Security"> <Select Path="Security"> *[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and (band(Keywords,9007199254740992)) and (EventID=4689)]] and *[EventData[(Data='PATH TO THE DESIRED EXE')]] </Select> </Query> </QueryList>
– V. Rubinetti
Oct 25 '17 at 21:47
add a comment |
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:WindowsSystem32notepad.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.
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:WindowsSystem32notepad.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.
answered Apr 24 '14 at 0:31
PaulPaul
48.2k13122147
48.2k13122147
I dont have anything named secpol.msc. I made a small reserach and I think its because it is not available in Windows 7 Home Premium. Is there another way?
– TheBird956
Apr 24 '14 at 2:30
The audit policy needs to be changed for this to work, and it is absent from W7HP. There are a few guides out there for installing gpedit.msc on W7HP which you might want to try. You can edit the audit policy with this too, inComputer Configuration/Windows Settings/Security Settings/Audit Policy
– Paul
Apr 24 '14 at 3:19
@TheBird956 Did you manage to get it to work?
– Paul
Jul 3 '14 at 8:09
I do not have the correct windows version. I think I need Pro to do that, but I tried on my brother's computer who has Pro installed and it works.
– TheBird956
Jul 3 '14 at 22:44
To set the trigger to program/process exit/termination/close instead of start/create, this XML for the event filter worked for me:<QueryList> <Query Id="0" Path="Security"> <Select Path="Security"> *[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and (band(Keywords,9007199254740992)) and (EventID=4689)]] and *[EventData[(Data='PATH TO THE DESIRED EXE')]] </Select> </Query> </QueryList>
– V. Rubinetti
Oct 25 '17 at 21:47
add a comment |
I dont have anything named secpol.msc. I made a small reserach and I think its because it is not available in Windows 7 Home Premium. Is there another way?
– TheBird956
Apr 24 '14 at 2:30
The audit policy needs to be changed for this to work, and it is absent from W7HP. There are a few guides out there for installing gpedit.msc on W7HP which you might want to try. You can edit the audit policy with this too, inComputer Configuration/Windows Settings/Security Settings/Audit Policy
– Paul
Apr 24 '14 at 3:19
@TheBird956 Did you manage to get it to work?
– Paul
Jul 3 '14 at 8:09
I do not have the correct windows version. I think I need Pro to do that, but I tried on my brother's computer who has Pro installed and it works.
– TheBird956
Jul 3 '14 at 22:44
To set the trigger to program/process exit/termination/close instead of start/create, this XML for the event filter worked for me:<QueryList> <Query Id="0" Path="Security"> <Select Path="Security"> *[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and (band(Keywords,9007199254740992)) and (EventID=4689)]] and *[EventData[(Data='PATH TO THE DESIRED EXE')]] </Select> </Query> </QueryList>
– V. Rubinetti
Oct 25 '17 at 21:47
I dont have anything named secpol.msc. I made a small reserach and I think its because it is not available in Windows 7 Home Premium. Is there another way?
– TheBird956
Apr 24 '14 at 2:30
I dont have anything named secpol.msc. I made a small reserach and I think its because it is not available in Windows 7 Home Premium. Is there another way?
– TheBird956
Apr 24 '14 at 2:30
The audit policy needs to be changed for this to work, and it is absent from W7HP. There are a few guides out there for installing gpedit.msc on W7HP which you might want to try. You can edit the audit policy with this too, in
Computer Configuration/Windows Settings/Security Settings/Audit Policy
– Paul
Apr 24 '14 at 3:19
The audit policy needs to be changed for this to work, and it is absent from W7HP. There are a few guides out there for installing gpedit.msc on W7HP which you might want to try. You can edit the audit policy with this too, in
Computer Configuration/Windows Settings/Security Settings/Audit Policy
– Paul
Apr 24 '14 at 3:19
@TheBird956 Did you manage to get it to work?
– Paul
Jul 3 '14 at 8:09
@TheBird956 Did you manage to get it to work?
– Paul
Jul 3 '14 at 8:09
I do not have the correct windows version. I think I need Pro to do that, but I tried on my brother's computer who has Pro installed and it works.
– TheBird956
Jul 3 '14 at 22:44
I do not have the correct windows version. I think I need Pro to do that, but I tried on my brother's computer who has Pro installed and it works.
– TheBird956
Jul 3 '14 at 22:44
To set the trigger to program/process exit/termination/close instead of start/create, this XML for the event filter worked for me:
<QueryList> <Query Id="0" Path="Security"> <Select Path="Security"> *[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and (band(Keywords,9007199254740992)) and (EventID=4689)]] and *[EventData[(Data='PATH TO THE DESIRED EXE')]] </Select> </Query> </QueryList>
– V. Rubinetti
Oct 25 '17 at 21:47
To set the trigger to program/process exit/termination/close instead of start/create, this XML for the event filter worked for me:
<QueryList> <Query Id="0" Path="Security"> <Select Path="Security"> *[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and (band(Keywords,9007199254740992)) and (EventID=4689)]] and *[EventData[(Data='PATH TO THE DESIRED EXE')]] </Select> </Query> </QueryList>
– V. Rubinetti
Oct 25 '17 at 21:47
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f745318%2fhow-to-start-a-program-when-another-one-is-started%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
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
Apr 23 '14 at 23:40
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
Apr 23 '14 at 23:45