2 septembre 2016 5 02 /09 /septembre /2016 17:31
[DOS] Script de sauvegarde de profil Windows

@echo off title Sauvegarde de %computername% vers Machine de Geekers 77.56 color 0A :home cls echo. SET DATE=%date:/=-% REM set /p Login= Hi, Fournissez moi un compte admin sous la forme prenom.nom : REM set /p Pass= indiquer votre mot de passe echo cree par Geekers, en date du 02/09/2016 echo. echo Choisissez une tache: echo ===================================================== echo. echo 1) SAVE: Sauvegardes de Profil echo. echo 2) RESTORE: Restauration de Profil echo. echo ===================================================== echo. echo. set /p errorlevel=Type option: if "%errorlevel%"=="1" goto SAVE if "%errorlevel%"=="2" goto RESTORE :SAVE robocopy "%appdata%\microsoft\signatures" "\\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\signatures" /e robocopy "%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" "\\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\TaskBar" /e robocopy "%appdata%\microsoft\outlook" "\\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\outlook" /e robocopy %userprofile%\Favorites\ \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\Favorites\ /e robocopy %userprofile%\downloads\ \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\downloads\ /e robocopy %userprofile%\pictures\ \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\pictures\ /e robocopy %userprofile%\videos\ \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\videos\ /e robocopy %userprofile%\music\ \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\music\ /e robocopy %userprofile%\virtual machines \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\virtual_machines\ /e robocopy %userprofile%\links\ \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\links\ /e robocopy %userprofile%\contacts\ \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\contacts\ /e robocopy %userprofile%\Desktop\ \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\desktop\ /e robocopy %userprofile%\Documents\ \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%computername%\Documents\ /e REM SAUVEGARDE D'ELEMENT DE LA BASE DE REGISTRE REG EXPORT "HKCU\Software\Microsoft\Office\12.0\Outlook" D:\Sauvegardes\Save_Profils\%username%\%computername%\OutCfg.reg REG EXPORT "HKCU\Software\Microsoft\Internet Explorer" D:\Sauvegardes\Save_Profils\%username%\%computername%\IECfg.reg REG EXPORT "HKCU\Network" D:\Sauvegardes\Save_Profils\%username%\%computername%\LctRsx.reg REG EXPORT "HKCU\Printers" D:\Sauvegardes\Save_Profils\%username%\%computername%\ImprRsx.reg REG EXPORT "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows" D:\Sauvegardes\Save_Profils\%username%\%computername%\ImprDft.reg Echo FIN pause EXIT :RESTORE set /p Poste= indiquer le nom du PC d'origine: robocopy "\\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\signatures" "%appdata%\microsoft\signatures" /s /e /y /i robocopy "\\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\TaskBar" "%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" /s /e /y /i robocopy "\\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\outlook" "%appdata%\microsoft\outlook" /s /e /y /i robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\Favorites\ %userprofile%\Favorites\ /e robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\Favorites\ %userprofile%\Favoris\ /e robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\downloads\ %userprofile%\downloads\ /e robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\pictures\ %userprofile%\pictures\ /e robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\videos\ %userprofile%\videos\ /e robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\music\ %userprofile%\music\ /e robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\virtual machines\ %userprofile%\virtual machines\ /e robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\links\ %userprofile%\links\ /e robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\saved games\ %userprofile%\saved games\ /e robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\contacts\ %userprofile%\contacts\ /e robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\desktop\ %userprofile%\Desktop\ /e robocopy \\192.168.77.56\D$\Sauvegardes\Save_Profils\%username%\%Poste%\My Documents\ %userprofile%\Documents\ /e REM REG IMPORT HKCU\Software\Microsoft\Office\12.0\Outlook" D:\Sauvegardes\Save_Profils\%username%\%computername%\OutCfg.reg REM REG IMPORT HKCU\Software\Microsoft\Internet Explorer" D:\Sauvegardes\Save_Profils\%username%\%computername%\IECfg.reg REM REG IMPORT HKCU\Network" D:\Sauvegardes\Save_Profils\%username%\%computername%\LctRsx.reg REM REG IMPORT HKCU\Printers" D:\Sauvegardes\Save_Profils\%username%\%computername%\ImprRsx.reg REM REG IMPORT HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows" D:\Sauvegardes\Save_Profils\%username%\%computername%\ImprDft.reg Echo FIN pause EXIT

Partager cet article

Repost 0

commentaires