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:
prashker
Veteran Member
*****


Posts: 5109
Reputation: 104
– / Male / –
Joined: Mar 2005
Status: Away
O.P. once "NxWin.exe" closes, taskkill NxSSH.exe [solved: <3 segosa]
i dunno, segosa told me something about tasklist :p

(apparently this cannot be done in batch so can someone compile an exe for me or something :p)

This post was edited on 09-18-2008 at 02:51 AM by prashker.
09-17-2008 09:37 PM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: once "NxWin.exe" closes, taskkill NxSSH.exe (can someone write this for me?)
A Batch COULD do it if you used it to start NxWin.
[Image: 1-0.png]
             
09-17-2008 10:44 PM
Profile PM Web Find Quote Report
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 »


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