本帖最后由 czjt1234 于 2022-11-26 19:28 编辑
- Set oWMI = GetObject("Winmgmts:\\.\Root\Cimv2")
- Set oSWbemObjectSet = oWMI.InstancesOf("Win32_OperatingSystem")
- For Each oSWbemObject In oSWbemObjectSet
- Wsh.Echo oSWbemObject.FreePhysicalMemory, oSWbemObject.TotalVisibleMemorySize
- Next
复制代码
- @echo off
- for /f "tokens=1,2 delims= " %%i in ('CScript.exe /nologo D:\test.vbs') do (
- set a=%%i
- set b=%%j
- )
- pause
复制代码
|