Advertisement
JacobPaulin

Get Device Windows Key

Mar 16th, 2023
690
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2.  
  3. title Get Windows Key
  4.  
  5. for /f "tokens=2 delims==" %%i in ('"wmic path softwarelicensingservice get oa3xoriginalproductkey /format:list"') do set key=%%i
  6.  
  7. echo:
  8. echo Your Windows Licensing Key Is: %key%
  9. echo:
  10.  
  11. set /p doCopy="Would you like copy the key to your clipboard? (y/n) "
  12.  
  13. if %doCopy%==y (
  14.     echo | set /p=%key%| clip
  15.     echo Key successfully copied!
  16.     echo:
  17. )
  18.  
  19. echo [Press any key to close this window]
  20. pause >nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement