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]" <> сообщил/сообщила в
новостях следующее:
news:2018fa9c-896b-459e-9953-...
> 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 help..
>
> i couldn`t find the sintax of the taskkill to refer this command to a
> name.. just pid and others...
>
>
> thanks
|