把5楼的脚本变换了一下(只变了for的表述形式,本质完成一样)- @echo off
- for /f "tokens=* delims=:=" %%a in ('"wmic os get Caption,InstallDate,OSArchitecture,Version /Format:List"^|findstr ^=') do set "%%~a"
- echo Windows_信息:%Caption%%Version% 【%OSArchitecture%】 安装日期:%InstallDate:~0,4%年%InstallDate:~4,2%月%InstallDate:~6,2%日_%InstallDate:~8,2%点%InstallDate:~10,2%分%InstallDate:~12,2%秒
- echo.
- pause
复制代码
|