|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
hi guys... i`ll be searching in the web trying to find a script to
kill one or various process, but i just can find how to kill process by pid. how can i to this.... just searching the name process like Starting with X.... or task%.. something like that.. if someone could .. i couldn`t find the sintax of the taskkill to refer this command to a name.. just pid and others... thanks |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
"Hansel Ortiz -[BrEcHaWarr]" <hansel.ortiz@gmail.com> wrote in message news:2018fa9c-896b-459e-9953-f9f09bc00850@f63g2000hsf.googlegroups.com... > hi guys... i`ll be searching in the web trying to find a script to > kill one or various process, but i just can find > how to kill process by pid. > > how can i to this.... just searching the name process like Starting > with X.... or task%.. > something like that.. if someone could .. > > i couldn`t find the sintax of the taskkill to refer this command to a > name.. just pid and others... > > > thanks Type taskkill /? at the Command Prompt to get the full for this command (and, for that, for any other console command!). |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Sep 23, 1:57pm, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:
> "Hansel Ortiz -[BrEcHaWarr]" <hansel.or...@gmail.com> wrote in messagenews:2018fa9c-896b-459e-9953-f9f09bc00850@f63g2000hsf.googlegroups.com... > > > hi guys... i`ll be searching in the web trying to find a script to > > kill one or various process, but i just can find > > how to kill process by pid. > > > how can i to this.... just searching the name process like Starting > > with X.... or task%.. > > something like that.. if someone could .. > > > i couldn`t find the sintax of the taskkill to refer this command to a > > name.. just pid and others... > > > thanks > > Type taskkill /? at the Command Prompt to get the full for this command > (and, for that, for any other console command!). well.. i just need the reference to search a process for name, i used taskkill /? and i dont know wich one to use :S i Try this batch file version. but trying to change the syntax of the "notepad.exe" for examble --->>> "Note%" all processes that start with 'note' @echo off set prev= FOR /F "tokens=2" %%i IN ('tasklist ^| Find /i "notepad.EXE"') DO CALL :windowlist %%i goto :EOF :windowlist if not "%prev%"=="" echo TASKKILL /PID %prev% /F set prev=%1 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
"Hansel Ortiz -[BrEcHaWarr]" <hansel.ortiz@gmail.com> wrote in message news:1b5ca0fe-2938-4b58-8f73-4354f0b74ac2@z72g2000hsb.googlegroups.com... On Sep 23, 1:57 pm, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote: > "Hansel Ortiz -[BrEcHaWarr]" <hansel.or...@gmail.com> wrote in > messagenews:2018fa9c-896b-459e-9953-f9f09bc00850@f63g2000hsf.googlegroups.com... > > > hi guys... i`ll be searching in the web trying to find a script to > > kill one or various process, but i just can find > > how to kill process by pid. > > > how can i to this.... just searching the name process like Starting > > with X.... or task%.. > > something like that.. if someone could .. > > > i couldn`t find the sintax of the taskkill to refer this command to a > > name.. just pid and others... > > > thanks > > Type taskkill /? at the Command Prompt to get the full for this > command > (and, for that, for any other console command!). well.. i just need the reference to search a process for name, i used taskkill /? and i dont know wich one to use :S i Try this batch file version. but trying to change the syntax of the "notepad.exe" for examble --->>> "Note%" all processes that start with 'note' @echo off set prev= FOR /F "tokens=2" %%i IN ('tasklist ^| Find /i "notepad.EXE"') DO CALL :windowlist %%i goto :EOF :windowlist if not "%prev%"=="" echo TASKKILL /PID %prev% /F set prev=%1 ================ The batch file you quote does something quite different from what you want: It kills every "notepad" process except for the last one in the list. If you want to kill all processes whose names contain the word "note" then you can do it much more simply: @echo off setlocal EnableDelayedExpansion set PIDs= for /F "tokens=2" %%a in ('tasklist ^| find "note"') do set PIDs=!PIDs! /pid %%a echo TaskKill %PIDs% /F /T Remove the word "echo" in the last line to activate the batch file. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Here my cmd-file: pskill.cmd
------------- @ECHO OFF REM Using this bat-file: pskill ProcessName [RemoteComputerName] [UserName] [UserPassword] IF "%1"=="" (GOTO Error) IF "%2"=="" (SET NodeName=.) ELSE (SET NodeName=%2) IF NOT "%3"=="" (GOTO AnotherUser) wmic /NODE:%NodeName% PROCESS WHERE (name="%1") CALL TERMINATE GOTO End :AnotherUser SET UserName=%3 IF NOT "%4"=="" (SET Password=%4) ELSE (SET Password="") wmic /NODE:%NodeName% /User:%UserName% /Password:%Password% PROCESS WHERE (name="%1") CALL TERMINATE GOTO End :Error ECHO Using this bat-file: pskill ProcessName [RemoteComputerName] [UserName] [UserPassword] :End ------------------ With best regards Andrew Mishechkin "Hansel Ortiz -[BrEcHaWarr]" <hansel.ortiz@gmail.com> Ñообщил/Ñообщила в новоÑÑ‚ÑÑ… Ñледующее: news:2018fa9c-896b-459e-9953-f9f09bc00850@f63g2000hsf.googlegroups.com... > hi guys... i`ll be searching in the web trying to find a script to > kill one or various process, but i just can find > how to kill process by pid. > > how can i to this.... just searching the name process like Starting > with X.... or task%.. > something like that.. if someone could .. > > i couldn`t find the sintax of the taskkill to refer this command to a > name.. just pid and others... > > > thanks |
|
![]() |
| Outils de la discussion | |
|
|