本帖最后由 pcl_test 于 2017-5-6 11:58 编辑
- @echo off
- for /f %%a in ('wmic path Win32_ComputerSystemProduct get uuid /value^|find "="') do set %%a
- set /p=%uuid:-=%<nul>"uuid.txt"
- pause
复制代码
- @echo off
- for /f %%a in ('powershell "(gwmi Win32_ComputerSystemProduct).UUID.Replace('-','')"') do set/p=%%a<nul>"uuid.txt"
- pause
复制代码
- @echo off
- powershell ^
- $fso=New-Object -ComObject Scripting.FileSystemObject;^
- $uuid=(gwmi Win32_ComputerSystemProduct).UUID.Replace('-','');^
- $fso.CreateTextFile('uuid.txt', 2).Write($uuid);
- pause
复制代码
- @echo off
- powershell "Write-Host (gwmi Win32_ComputerSystemProduct).UUID.Replace('-','') -nonewline">"uuid.txt"
- pause
复制代码
|