Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2015
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.41 KB | None | 0 0
  1. @echo off
  2. @break off
  3. @Script
  4. @color 0a
  5. @cls
  6.  
  7. echo Greetings Eumar.%USERNAME%
  8. echo Please remember to run this script as an ADMINISTRATOR (Root).
  9.  
  10. :start
  11. echo.
  12. ECHO 1. Begin
  13. ECHO 2. Information
  14. ECHO 3. Exit
  15.  
  16.  
  17. REM set /p ID=""
  18.  
  19.  
  20.  
  21. set /p choice=Choose your option
  22. if '%choice%'=='' ECHO "%choice%" is not valid please try again
  23. if '%choice%'=='1' goto start
  24. if '%choice%'=='2' goto info
  25. if '%choice%'=='3' goto exit
  26. echo.
  27. goto start
  28.  
  29. :info
  30. echo Made for Outlook setting backup
  31.  
  32.  
  33. :start
  34.  
  35.  
  36. echo Status: Creating Backup Folder
  37.  
  38. if not exist "%userprofile%\Eumar\Backup" (
  39.   mkdir "%userprofile%\Eumar\Backup"
  40.   %SystemRoot%\explorer.exe "%userprofile%\Eumar\Backup"
  41.   if "!errorlevel!" EQU "0" (
  42.     echo Creating backup folder
  43.   ) else (
  44.     echo Error creating folder
  45.      
  46.   )
  47. ) else (
  48. %SystemRoot%\explorer.exe "%userprofile%\Eumar\Backup"
  49.  
  50. )
  51.  
  52. echo Status: Getting the list of users...
  53. wmic useraccount get name,sid
  54.  
  55.  
  56. echo Status: Creating a temporary file, please find your username!
  57. wmic useraccount get name,sid /format:csv > %temp%/output.csv
  58. start %temp%/output.csv
  59.  
  60.  
  61. echo Please PASTE your ID (eg. S-1-5-21-2679822001-1331107376-912371272-1622)
  62. set /p ID=""
  63.  
  64.  
  65. echo Status: Backing up your registry!
  66.  
  67. reg export [HKEY_USERS\%ID%\Software\Microsoft\Office\15.0\MailSettings] %userprofile%\Runway\Backup\BackupHKLM.Reg /y
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. :exit
  76.  
  77. echo. Done!
  78. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement