batch file to kill all quickbooks processes

There is a bug in QuickBooks 2011 (and other versions) networking which requires that, if a data file exists on another machine (a NAS in this case), you must kill all processes that begin with "QB" before starting quickbooks in order to avoid an error.

Is there a way to do this programmatically?  something like unix's killall(1) but for windows would be good for this.
1_21gigawattsAsked:
Who is Participating?
 
becraigConnect With a Mentor Commented:
taskkill /F /im QB*

you can loop this for multiple computers if need be

for /f % in (serverlist.txt) do psexec \\% cmd /c taskkill /F /im QB*
0
 
comfortjeaniusConnect With a Mentor Commented:
You can use this in your batch file

taskkill /f /im <process name>

Open in new window


save the file with the .bat extension
0
 
comfortjeaniusCommented:
Plus with the batch file you can make a schedule task, How to schedule a Batch File to run automatically in Windows 7 | 8 plus with a schedule task you can deploy thru Group policy , Configure a Scheduled Task Item
0
 
1_21gigawattsAuthor Commented:
Taskkill, huh. I never knew that existed. Points to you both, comforjeanius for being first, and becraig for the more complete syntax.

Thanks, folks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.