What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Help writing a batch file

Help writing a batch file
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Help writing a batch file
quote:
Originally posted by MeEtc
Having a problem with the second half of the script with synergys.exe. The batch file won't continue running because synergys.exe is still running. ultramon.exe won't start until synergys.exe stops. Any way around that?
What second half? What you mean by "synergys is still running"? You mean taskkill doesnt kill the synergys process ?

I ask this because it makes little sense that by adding START to everything it all of a sudden does work. Because you should not explicitly need the START command to start a program!

You only explicitly need START if you want to alter the console window like the title, minimized state, change the priority, wait for the app to quit, etc...

It should work perfectly without it, provided taskkill does kill the process in time. For that reason, and only that reason, it might be a good idea to build in a wait period before running "c:\program files\ultramon\ultramon.exe" /e so that taskkill has some time to kill the synergys process.

As that is the problem from what I understand from your post.

So, simply adding START like Jarod said doesn't make any difference and wont fix anything and you will most likely experience the same problem another time (when taskkill needs some more time than instant for whatever reason to kill synergys).

So instead of adding START everywhere, try to change:
   taskkill /f /t /im synergys.exe
to
   start /wait taskkill /f /t /im synergys.exe
this should pause the batch until taskkill has done its job instead of immediatly executing the next line (starting ultramon).

This post was edited on 04-23-2009 at 07:30 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
04-23-2009 06:54 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help writing a batch file - by MeEtc on 04-21-2009 at 03:09 AM
RE: Help writing a batch file - by Jarrod on 04-21-2009 at 05:43 AM
RE: Help writing a batch file - by MeEtc on 04-21-2009 at 05:55 AM
RE: Help writing a batch file - by Jarrod on 04-21-2009 at 06:47 AM
RE: Help writing a batch file - by Dempsey on 04-21-2009 at 07:44 AM
RE: Help writing a batch file - by CookieRevised on 04-21-2009 at 04:09 PM
RE: Help writing a batch file - by Dempsey on 04-21-2009 at 05:15 PM
RE: Help writing a batch file - by Mike on 04-21-2009 at 06:00 PM
RE: Help writing a batch file - by MeEtc on 04-21-2009 at 06:24 PM
RE: Help writing a batch file - by MeEtc on 04-22-2009 at 02:27 AM
RE: Help writing a batch file - by Jarrod on 04-22-2009 at 03:35 AM
RE: Help writing a batch file - by MeEtc on 04-22-2009 at 04:26 AM
RE: Help writing a batch file - by CookieRevised on 04-23-2009 at 06:54 AM
RE: Help writing a batch file - by Vilkku on 04-23-2009 at 07:27 AM
RE: Help writing a batch file - by CookieRevised on 04-23-2009 at 07:37 AM
RE: Help writing a batch file - by foaly on 04-23-2009 at 12:01 PM
RE: RE: Help writing a batch file - by CookieRevised on 04-23-2009 at 10:22 PM
RE: Help writing a batch file - by MeEtc on 04-23-2009 at 03:12 PM
RE: Help writing a batch file - by Jarrod on 04-23-2009 at 10:39 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On