Thought I wouldn't be able to pull it off this week but here are the batch files you need to work with.
With some settings ajustments and I'll keep on working on them even make a autoit script soon..
So here we go bare in mind this is setup for my DefaultBox but I'll be modifing it acording to everyone needs
But I did want to have something functional for all to understand how it's done.
First Batch file you need is the Initial Backup.
-----------------------------------------------------------------
Backup.bat
-----------------------------------------------------------------
:Backup
taskkill /F /IM SbieCtrl.exe
xcopy c:\Sandbox\%USERNAME%\DefaultBox\*.* c:\Original\Sanboxie\DefaultBox /e /i /h /y
"C:\Program Files\Sandboxie\SbieCtrl.exe" /open
-----------------------------------------------------------------
Note: The taskkill program shut's the process of sandboxie so that you can unlock the reghive.
Should there be a easier way to launch SB let me know
-----------------------------------------------------------------
BackupDiff.bat
-----------------------------------------------------------------
:BackupDiff
taskkill /F /IM SbieCtrl.exe
xcopy c:\Sandbox\%USERNAME%\DefaultBox\*.* c:\Modified\Sanboxie\DefaultBox /e /i /h /y
"C:\Program Files\Sandboxie\SbieCtrl.exe" /open
-----------------------------------------------------------------
-----------------------------------------------------------------
Restore.bat
-----------------------------------------------------------------
:Restore
taskkill /F /IM SbieCtrl.exe
rd /s /q c:\Sandbox\%USERNAME%\DefaultBox\
xcopy c:\Original\Sanboxie\DefaultBox*.* c:\Sandbox\%USERNAME%\DefaultBox\ /e /i /h /y
rem "C:\Program Files\Sandboxie\SbieCtrl.exe" /open
-----------------------------------------------------------------
Note: To restore a Original backup that you did. Warning this removes the DefaultBox folder
before re-copying the files into it.
-----------------------------------------------------------------
sbtool.bat (This batch calls the others needed to run)
-----------------------------------------------------------------
@echo off
REM ------------------------------------------------------------
REM Sandboxie Backup / Restore / What Has Changed Tool
REM ------------------------------------------------------------
Subst L: C:\Original\Sandboxie\DefaultBox
Subst M: C:\Modified\Sandboxie\DefaultBox
Call MakeFolders.bat
Call OriginalCompare.bat
Call ModifiedCompare.bat
Call getreg.bat
Subst L: /D
Subst M: /D
Echo Done...
Pause
-----------------------------------------------------------------
MakeFolders.bat
-----------------------------------------------------------------
@echo off
REM ------------------------------------------------------------
REM Sandboxie Backup / Restore / What Has Changed Tool
REM ------------------------------------------------------------
Set Original=L:
Set Modified=M:
dir /s /b /ad "%Modified%" > C:\ModFolder.txt
for /F "tokens=*" %%* in (c:\ModFolder.txt) do call :Foldersub %%*
Goto :EOF
:Foldersub
Set Folder=%*
Set Folder=%Folder:~3%
Echo %Folder% >>C:\flist.txt
MD "C:\Different\%Folder%"
-----------------------------------------------------------------
OriginalCompare.bat
-----------------------------------------------------------------
@echo off
REM ------------------------------------------------------------
REM Sandboxie Backup / Restore / What Has Changed Tool
REM ------------------------------------------------------------
REM DEFINE YOUR OWN LETTERS HERE THESES ARE EXAMPLES
Set Original=L:
Set Modified=M:
dir /a-d /s /b "%Original%" > C:\Original.txt
for /F "tokens=*" %%* in (c:\Original.txt) do call :Originalsub %%*
Goto :EOF
:Originalsub
set One=%*
set Two=%*
set Two=%Modified%%Two:~2%
set Three=%Two:~3%
If EXIST "%Two%" fc /b "%One%" "%Two%" |find /i "no differences" >Nul
SET VALUE=%ERRORLEVEL%
IF %VALUE% == 1 echo f |xcopy "%Two%" "C:\Different\%Three%" /H /Y /V >Nul
if NOT EXIST "%Two%" Echo The File located in %TWO% Has been deleted from Original Location. >> C:\DeletedList.txt
-----------------------------------------------------------------
-----------------------------------------------------------------
ModifiedCompare.bat
-----------------------------------------------------------------
@Echo off
REM ------------------------------------------------------------
REM Sandboxie Backup / Restore / What Has Changed Tool
REM ------------------------------------------------------------
REM DEFINE YOUR OWN LETTERS HERE THESES ARE EXAMPLES
Set Original=L:
Set Modified=M:
dir /a-d /s /b "%Modified%" > C:\Modified.txt
for /F "tokens=*" %%* in (c:\Modified.txt) do call :Modifiedsub %%*
Goto :EOF
:Modifiedsub
set One=%*
set Two=%*
set Two=%Original%%Two:~2%
set Three=%Two:~3%
If EXIST "%Two%" fc /b "%One%" "%Two%" |find /i "no differences" >nul
SET VALUE=%ERRORLEVEL%
IF %VALUE% == 1 echo f |xcopy "%One%" "C:\Different\%Three%" /H /Y /V >nul
IF NOT EXIST "%Two%" echo f |xcopy "%One%" "C:\Different\%Three%" /H /Y /V >Nul
-----------------------------------------------------------------
GetReg.bat (This will collect the registry changes and place them in a reg file for you)
-----------------------------------------------------------------
REM CHANGE Sandbox_Compaq_Owner_DefaultBox FOR YOUR SANDBOX MOUNTED LOCATION
REG LOAD HKEY_USERS\Sandbox_Compaq_Owner_DefaultBox L:\RegHive
REG EXPORT HKEY_USERS\Sandbox_Compaq_Owner_DefaultBox Original.reg
REG UNLOAD HKEY_USERS\Sandbox_Compaq_Owner_DefaultBox
REG LOAD HKEY_USERS\Sandbox_Compaq_Owner_DefaultBox M:\RegHive
REG EXPORT HKEY_USERS\Sandbox_Compaq_Owner_DefaultBox Modified.reg
REG UNLOAD HKEY_USERS\Sandbox_Compaq_Owner_DefaultBox
REM REGDIFF can be downloaded at
http://www.p-nand-q.com/download/regdiff.html
regdiff modified.reg original.reg -d Changes.reg
-=-=-=-=-=-=-=-=--=-=-=--=-=-=-=--=-=-=-=-=-=--
I'll be merging all these batch files together over the weekend to make it easier to understand.
I'll be documenting it but I wanted to post a preview version of the script.
I'll be working on this all week-end to clean it up and make it more user friendly.
Shawn