Advertisement
anhkiet2507

Generate and Change Windows GUID Script

Dec 6th, 2021
2,864
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.25 KB | None | 0 0
  1. @echo off
  2. title Machine GUID Change Tool by KietDZ
  3. color 0A
  4. :: BatchGotAdmin
  5. :-------------------------------------
  6. REM  --> Check for permissions
  7.     IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
  8. >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
  9. ) ELSE (
  10. >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  11. )
  12.  
  13. REM --> If error flag set, we do not have admin.
  14. if '%errorlevel%' NEQ '0' (
  15.     echo Requesting administrative privileges...
  16.     goto UACPrompt
  17. ) else ( goto gotAdmin )
  18.  
  19. :UACPrompt
  20.     echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  21.     set params= %*
  22.     echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
  23.  
  24.     "%temp%\getadmin.vbs"
  25.     del "%temp%\getadmin.vbs"
  26.     exit /B
  27.  
  28. :gotAdmin
  29.     pushd "%CD%"
  30.     CD /D "%~dp0"
  31. :--------------------------------------
  32. echo GUID Change Tool by KietDZ
  33. echo This tool will change your machine's GUID. It uses for reset license of Power-Users
  34. echo Copy this string bellow
  35. powershell -command [guid]::NewGuid().ToString()
  36. set /p guid=" Paste it here: "
  37. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography" /v MachineGuid /t REG_SZ /d %guid% /f
  38.  
  39. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement