求cmd挂起某特定进程的代码

来源:百度知道 编辑:UC知道 时间:2024/06/18 07:48:09
以QQ.exe为例,谢了

如果你是想达到编程中的挂起效果,恐怕仅用cmd是不可以的,不过可以用cmd创建,禁用,和结束特定进程,

删除指定进程(根据进程名称):
wmic process where name="qq.exe" call terminate
或者用
wmic process where name="qq.exe" delete
创建新进程
wmic process call create "C:\Program Files\Tencent\QQ\QQ.exe"
禁用:
reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\qq.exe" /v debugger /t reg_sz /d qq.exe /f 1>nul 2>&1