本帖最后由 WHY 于 2016-8-18 14:51 编辑
- @echo off
- setlocal enabledelayedexpansion
- set n=0
- for /f "delims=" %%i in ('wmic process where "Name='notepad.exe'" get ExecutablePath ^| find "\"') do (
- for /f "delims=" %%i in ("%%i") do set /a n+=1 & set "strPath!n!=%%~fi"
- )
- wmic process where "Name='notepad.exe'" call Terminate
- for /l %%i in (1 1 %n%) do wmic process call Create "!strPath%%i!"
- pause
复制代码
|