Windows Task Scheduler
#1
Scooby Regular
Thread Starter
Join Date: Mar 2001
Location: Berkshire
Posts: 5,528
Likes: 0
Received 0 Likes
on
0 Posts
Windows Task Scheduler
Hi all
Is there a way of setting a scheduled task in Vista so that it checks to see if iTunes is running, and if so closes it down at a particular time ?
I use Allway Sync to replicate my files to another PC every night but its no point replicating a database file if the database is open. I dont suppose theres a hot backup mode for iTunes....
Dave
Is there a way of setting a scheduled task in Vista so that it checks to see if iTunes is running, and if so closes it down at a particular time ?
I use Allway Sync to replicate my files to another PC every night but its no point replicating a database file if the database is open. I dont suppose theres a hot backup mode for iTunes....
Dave
#3
Scooby Regular
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like
on
1 Post
save this as a vbs file, change outlook.exe to be whatever the name is and it should kill it for you.
David
Code:
strApp = "Outlook.exe" Set objWMIService = GetObject ("winmgmts:\\.\root\cimv2") wscript.echo "Checking " & strApp Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process where Name=" & "'" & strApp & "'") For Each objProcess In colProcessList wscript.echo "Killing " & strApp objProcess.Terminate() Next
#4
Scooby Regular
Thread Starter
Join Date: Mar 2001
Location: Berkshire
Posts: 5,528
Likes: 0
Received 0 Likes
on
0 Posts
Works a treat, but it comes up with a "checking" prompt and you have to click OK, and then a "killing" one. Can it be modded so that it just checks it and if its alive, it kills it silently, then displays a pop up box saying its either killed or was not present in the first place ?
Sorry, i am not after much am i......
Also, is there a way of doing task dependencies in Task Manager, so that if my iTuneskill.vbs script fails to kill the process, the sync process doesnt run ?
Sorry, i am not after much am i......
Also, is there a way of doing task dependencies in Task Manager, so that if my iTuneskill.vbs script fails to kill the process, the sync process doesnt run ?
Last edited by druddle; 07 April 2008 at 10:52 PM.
#5
Scooby Regular
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like
on
1 Post
pass.. about dependencies..
just delete the lines beginning wscript.echo to stop the prompt, or call it with cscript..
ie "cscript c:\Killprocess.vbs"
David
just delete the lines beginning wscript.echo to stop the prompt, or call it with cscript..
ie "cscript c:\Killprocess.vbs"
David
Thread
Thread Starter
Forum
Replies
Last Post
hardcoreimpreza
Computer & Technology Related
21
11 October 2015 03:40 PM