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
Dempsey got it... Although he made a woopsy with the find parameters:
code:
@ECHO OFF
tasklist | find /i "synergys.exe" 1>NUL 2>&1
IF %ERRORLEVEL% EQU 0 (
     taskkill /f /t /im synergys.exe
     "c:\program files\ultramon\ultramon.exe" /e
)
IF %ERRORLEVEL% EQU 1 (
     "c:\program files\synergy\synergys.exe" -a pieceofcrap:24800 -d FATAL
     "c:\program files\ultramon\ultramon.exe" /d
)
PS: other changes:
- 1>NUL 2>&1 will also surpress error messages on screen.
- Reason for 2 seperate IFs instead of the IF tHEN ELSE like before is so that the second one is not executed when an error (=errorlevel 2) occurs in the FIND command.
- Added parameter /T to taskkill command which will kill the process tree instead of only the process.
- No reason to first change the current directory to the respective program folders


;)

This post was edited on 04-21-2009 at 04:15 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
04-21-2009 04:09 PM
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