本帖最后由 wujunkai 于 2020-3-31 08:00 编辑
回复 5# testest
我这里有三个,不怎么知道做- "无线网络连接" "balabalabala"
- "本地连接" "balabalabala"
- "Bluetooth 网络连接" "balabalabala"
复制代码 给出一个近似的解决方案。- @echo off & setlocal enabledelayedexpansion
-
- set "type=制造商,电脑型号,操作系统"
-
- for /f "tokens=2 delims==" %%a in ('wmic csproduct get Vendor /value ^| findstr /i "Vendor"') do set "value=%%~a"
- for /f "tokens=2 delims==" %%a in ('wmic csproduct get Name /value ^| findstr /i "Name"') do set "value=%value%,%%~a"
- for /f "tokens=2 delims==" %%a in ('wmic os get caption /value ^| findstr /i "caption"') do set "value=%value%,%%~a"
- for /f "tokens=1,3 delims=," %%i in ('getmac /v /nh /fo:csv ^| findstr "..-..-..-..-..-.."') do (
- set type=!type!,%%i
- set value=!value!,%%j
- )
-
- echo %type%>mac.csv
- echo %value%>>mac.csv
-
- pause
复制代码
接下来,请仔细阅读代码,自行修改。(别告诉我你不会csv格式) |