SHARE
TWEET

backupper_savekey

a guest Mar 30th, 2018 221 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2.  
  3. reg query "HKU\S-1-5-19" >nul 2>&1 || (
  4.   echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  5.   echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
  6.   "%temp%\getadmin.vbs"
  7.   del "%temp%\getadmin.vbs" >nul 2>&1
  8.   exit /b
  9. )
  10.  
  11. set regkey=HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion
  12. set regvalue=ProgramData
  13. set regfile="%~dp0backupper_reg.reg"
  14.  
  15. reg query %regkey% /v %regvalue% | findstr /i "%regvalue%" >%regfile%
  16. set /p tmp=<%regfile%
  17. set tmp=%tmp:~33%
  18. set reghex=
  19.  
  20. :loop
  21. set tmp2=%tmp:~0,2%
  22. set tmp=%tmp:~2%
  23. set reghex=%reghex%%tmp2%,
  24. if not "%tmp%" == "" goto loop
  25.  
  26. echo Windows Registry Editor Version 5.00>%regfile%
  27. echo.>>%regfile%
  28. echo [%regkey%]>>%regfile%
  29. echo "%regvalue%"=hex:%reghex:~0,-1%>>%regfile%
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top