本帖最后由 apang 于 2014-11-3 16:15 编辑
那样的话,试试用find过滤- @echo off
- setlocal EnableDelayedExpansion
-
- for /f "tokens=1*delims==" %%i in ('wmic cpu get ProcessorId /value^|find "="') do (
- set "cpuid=!cpuid!%%j"
- )
-
- for /f "tokens=1*delims==" %%i in ('wmic diskdrive get serialnumber /value^|find "="') do (
- set "diskdrivenumber=!diskdrivenumber!%%j"
- )
-
- echo,%cpuid%%diskdrivenumber%
- pause
复制代码
|