- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('wmic process get ExecutablePath^,Processid /value^|find "="') do (
- set "%%a"
- echo !ExecutablePath! !Processid!
- pause>nul
- )
复制代码 我想给ExecutablePathhe Processid分别赋值,为啥结果打印出来是下面这样呢?ExecutablePath的路径怎么被截断了呢?
ECHO 处于关闭状态。
0
0
4
4
308
308indows\system32\csrss.exe
496indows\system32\csrss.exe
496indows\system32\wininit.exe
592indows\system32\wininit.exe
592indows\system32\services.exe
648indows\system32\services.exe
648indows\system32\lsass.exe
664indows\system32\lsass.exe
664indows\system32\lsm.exe
672indows\system32\lsm.exe
672indows\system32\svchost.exe
764indows\system32\svchost.exe
764rogram Files\NVIDIA Corporation\Display.NvContainer\NVDisplay.Container.exe
864rogram Files\NVIDIA Corporation\Display.NvContainer\NVDisplay.Container.exe
864indows\system32\svchost.exe
924indows\system32\svchost.exe
924indows\System32\svchost.exe
1008ndows\System32\svchost.exe
1008ndows\System32\svchost.exe
200indows\System32\svchost.exe |