What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » once "NxWin.exe" closes, taskkill NxSSH.exe [solved: <3 segosa]

once "NxWin.exe" closes, taskkill NxSSH.exe [solved: <3 segosa]
Author: Message:
segosa
Community's Choice
*****


Posts: 1407
Reputation: 92
Joined: Feb 2003
RE: once "NxWin.exe" closes, taskkill NxSSH.exe (can someone write this for me?)
tasklist lists all processes.

tasklist | find "NxWin.exe" will list NxWin.exe (if it exists)

I can't be bothered to figure out the batch file syntax, but you basically need to stick the result of tasklist | find "NxWin.exe" into a variable (or check directly) and see if it's empty. If it's empty, then NxWin.exe is gone, so you wanna taskkill NxSSH.exe.

Edit: Better yet, use tasklist | find /C "mirc.exe" and the result will be 1 if it exists and 0 otherwise, so that could be checked a lot easier.

Edit: oh screw you

download http://gifpaste.org/tmp/sleep.exe and stick it in your windows directory

code:
@echo off
rem fuck you batch script.
set proc=NxWin.exe

:crap

tasklist | find /C "%proc%" > nul

if "%ERRORLEVEL%" == "1" (
    echo I can't find %proc%
    taskkill /F /IM NxSSH.exe
    goto sonicsamfails
)

echo I've found nothing!
sleep 1

goto crap

:sonicsamfails
echo I killed it


This post was edited on 09-17-2008 at 11:04 PM by segosa.
The previous sentence is false. The following sentence is true.
09-17-2008 10:47 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
once "NxWin.exe" closes, taskkill NxSSH.exe [solved: <3 segosa] - by prashker on 09-17-2008 at 09:37 PM
RE: once "NxWin.exe" closes, taskkill NxSSH.exe (can someone write this for me?) - by Ezra on 09-17-2008 at 10:44 PM
RE: once "NxWin.exe" closes, taskkill NxSSH.exe (can someone write this for me?) - by segosa on 09-17-2008 at 10:47 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