Compressing a Profile
Post date: Oct 15, 2015 1:0:24 PM
Tools you'll need:
Tools
imagex
Can be found here.
Whats does this script do ?
Compresses and verifies a complete profile into a single wim file
How to Run this Script
example to backup the user profile franklinc
Profile-Backup.bat franklinc
example to backup the user profile aspire
Profile-Backup.bat franklinc
My Working script
Script
@echo off
:::: Test for cli ARG
IF [%1] == [] echo No Profile/Username set, Example: Profile_Backup_.bat franklinc & GOTO :EOF
:::: SET USERN to cli ARG
SET USERN=%1
:::: Check if profile exists
IF NOT EXIST "c:\Users\%USERN%" echo "No Profile found @ C:\users\%USERN%" & GOTO :EOF
set PATHTOTOOLS=\\files\scripts\wpm\Tools\Waik_3\amd64
:::: Run Backup
%PATHTOTOOLS%\imagex.exe /capture "c:\Users\%USERN%" /verify /check /compress maximum "C:\Profile_%COMPUTERNAME%_%USERN%.wim" "Profile:%COMPUTERNAME%:%USERN%" "Profile:%COMPUTERNAME%:%USERN%"
IF %ERRORLEVEL% NEQ 0 echo Error Backing up Profile & GOTO :EOF
Extra step!!
Backup / Export the Reg profile for the account from ***UNDER
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
Example Reg exported
Profile-Aspier.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-1407137883-3464530159-1217028313-11339]
"ProfileImagePath"=hex(2):43,00,3a,00,5c,00,55,00,73,00,65,00,72,00,73,00,5c,\
00,61,00,73,00,70,00,69,00,72,00,65,00,00,00
"Flags"=dword:00000000
"State"=dword:00000204
"CentralProfile"="\\\\files\\aspire\\profile.V2"
"Sid"=hex:01,05,00,00,00,00,00,05,15,00,00,00,5b,38,df,53,ef,88,80,ce,d9,60,8a,\
48,4b,2c,00,00
"ProfileLoadTimeLow"=dword:00000000
"ProfileLoadTimeHigh"=dword:00000000
"RefCount"=dword:00000000
"RunLogonScriptSync"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-1407137883-3464530159-1217028313-11339\Preference]