Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch file to retrieve UUID and S/N #4

Open
mooms06 opened this issue Nov 24, 2017 · 0 comments
Open

Batch file to retrieve UUID and S/N #4

mooms06 opened this issue Nov 24, 2017 · 0 comments

Comments

@mooms06
Copy link

@mooms06 mooms06 commented Nov 24, 2017

Hi CodeRush,

I've made a batch file to retrieve UUID, MAC, AND S/N from the current machine with wmic:

@echo off

Set TXT="FD44Editor.txt"

FOR /F "tokens=2 delims==" %%B IN ('WMIC csproduct get uuid /VALUE ^| FIND /I "UUID="') DO SET UU=%%B

set UU1=%UU:~0,2%
set UU2=%UU:~2,2%
set UU3=%UU:~4,2%
set UU4=%UU:~6,2%
set UU5=%UU:~9,2%
set UU6=%UU:~11,2%
set UU7=%UU:~14,2%
set UU8=%UU:~16,2%
set UU9=%UU:~19,2%
set UU10=%UU:~21,2%
set MAC=%UU:~24,12%

FOR /F "tokens=2 delims==" %%B IN ('WMIC baseboard get serialnumber /VALUE ^| FIND /I "serialnumber="') DO SET SN=%%B
FOR /F "tokens=2 delims==" %%B IN ('WMIC baseboard get product /VALUE ^| FIND /I "Product="') DO SET PROD=%%B

echo Motherboard name: %PROD%> %TXT%
echo Copy these numbers in FD44Editor>> %TXT%
echo.>> %TXT%
echo Primary card MAC:>> %TXT%
echo %MAC%>> %TXT%
echo.>> %TXT%
echo System UUID:>> %TXT%
echo %UU4%%UU3%%UU2%%UU1%%UU6%%UU5%%UU8%%UU7%%UU9%%UU10%%MAC%>> %TXT%
echo.>> %TXT%
echo Motherboard S/N:>> %TXT%
echo %SN%>> %TXT%
echo.
echo check %TXT%

timeout /t 10

Also attached:
UUID MAC SN RECOVERY.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.