12 mai 2015 2 12 /05 /mai /2015 14:11

@echo off
Menu by YTB
color 0A
:home
cls
echo.
set /p Login= Hi, Fournissez moi un compte admin sous la forme prenom.nom :
echo Choisissez une tache:
echo ===============================================
echo.
echo 1) SAVE: Sauvegarde Profil
echo 2) RESTORE: Restauration Profil


set /p errorlevel=Type option:


if "%errorlevel%"=="1" goto SAVE
if "%errorlevel%"=="2" goto RESTORE


:SAVE
xcopy "%appdata%\microsoft\signatures" "\\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\signatures" /e /d /y /i /h
xcopy "%userprofile%" "\\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\profil" /s /e /d /y /i
xcopy "%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" "\\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\TaskBar" /s /e /d /y /i
xcopy "%appdata%\microsoft\outlook" "\\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\outlook" /e /d /y /i /h


REGEDIT /s /e \\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\%Poste%\\OutCfg.reg "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook"
REGEDIT /s /e \\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\%Poste%\\IECfg.reg "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer"
REGEDIT /s /e \\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\%Poste%\\LctRsx.reg "HKEY_CURRENT_USER\Network"
REGEDIT /s /e \\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\%Poste%\\ImprRsx.reg "HKEY_CURRENT_USER\Printers"
REGEDIT /s /e \\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\%Poste%\\ImprDft.reg "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows"


pause
goto home


:RESTORE
set /p Poste= indiquer le nom du PC:
xcopy "\\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\signatures" "%appdata%\microsoft\signatures\" /s /e /y /i
xcopy "\\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%" "%userprofile%\" /s /e /y /i
xcopy "\\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\TaskBar" "%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" /s /e /y /i
xcopy "\\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\outlook" "%userprofile%\AppData\Roaming\Microsoft\Outlook"/s /e /y /i


REGEDIT /s \\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\%Poste%\\OutCfg.reg "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook"
REGEDIT /s \\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\%Poste%\\IECfg.reg "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer"
REGEDIT /s \\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\%Poste%\\LctRsx.reg "HKEY_CURRENT_USER\Network"
REGEDIT /s \\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\%Poste%\\ImprRsx.reg "HKEY_CURRENT_USER\Printers"
REGEDIT /s \\MONPOSTE\D$\Sauvegarde\Save_Profils\%username%\%Poste%\\ImprDft.reg "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows"


pause
goto home

Partager cet article

Repost 0

commentaires

Rechercher

Catégories