Sandboxie Forum - Freeze/Snapshot Sandbox Contents (9617) http://www.sandboxie.com/phpbb/viewtopic.php?t=9617 en-us 90 Mon Oct 10, 2011 8:53 am Mon Oct 10, 2011 8:53 am shawndion: We're Moving to Contributed Utilities... http://www.sandboxie.com/phpbb/viewtopic.php?p=73318#73318 Mon Oct 10, 2011 8:53 am http://www.sandboxie.com/phpbb/viewtopic.php?p=73318#73318 Join us at : [url]http://www.sandboxie.com/phpbb/viewtopic.php?t=11644[/url] Shawn tzuk: http://www.sandboxie.com/phpbb/viewtopic.php?p=73308#73308 Mon Oct 10, 2011 8:15 am http://www.sandboxie.com/phpbb/viewtopic.php?p=73308#73308 Looks like you're making progress shawndion, nice. To follow up on an earlier suggestion from D1G1T@L, I think you should post the documentation into a new topic in the Contributed Utilities forum, so that new forum can become the "home topic" for this utility. shawndion: http://www.sandboxie.com/phpbb/viewtopic.php?p=73280#73280 Sun Oct 09, 2011 7:53 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=73280#73280 Sorry for taking so long in regards to making it all in one file but I want this batch file to run with the least amount of user intervention. Pasted Bellow is a code that will grab the sandbox names and use them as a variable so that you don't have to type it in everytime you want to switch a sandbox to backup. But we're getting there I merged all the batches in one now I'm just optimizing it to get all the values so that you don't have to type them in. I'm also adding a Transpose Module (This will copy 1 sandbox to another great for MMORPG type of installations) The next step is a Sandboxie.ini Editor. Shawn Sample Output C:\WINDOWS>test Sandbox Choices (Up to 20 Sandboxes) 01.DefaultBox 02.NetObjectsFusionX 03.LineageII 04.OnlineGameDownloader 05.NoWebTest 06.HelpMaker 07.FireFox 08. 09. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Code : @echo off set /a counter=0 find "[" c:\Windows\Sandboxie.ini >c:\report.txt find /V " " C:\report.txt >c:\nospace.txt find /V "_" C:\nospace.txt >c:\no_.txt find "[" c:\no_.txt >c:\report.txt for /F "tokens=*" %%* in (c:\Report.txt) do call :Originalsub %%* goto :End :Originalsub set str=%* if "%str%"== "---------- C:\NO_.TXT" goto :eof if "%str%"== "[GlobalSettings]" goto :eof set /a counter+=1 set str=%str:~1,-1% set Box%counter%=%str% goto :eof :End Echo Sandbox Choices (Up to 20 Sandboxes) Echo 01. %box1% Echo 02. %box2% Echo 03. %box3% Echo 04. %box4% Echo 05. %box5% Echo 06. %box6% Echo 07. %box7% Echo 08. %box8% Echo 09. %box9% Echo 10. %box10% Echo 11. %box11% Echo 12. %box12% Echo 13. %box13% Echo 14. %box14% Echo 15. %box15% Echo 16. %box16% Echo 17. %box17% Echo 18. %box18% Echo 19. %box19% Echo 20. %box20% shawndion: http://www.sandboxie.com/phpbb/viewtopic.php?p=73197#73197 Fri Oct 07, 2011 7:07 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=73197#73197 @oloid I'll fix up the taskkill to work better so no worries It's just that I was up for over 48 hours of insomnia so I didn't get a chance to document properly and with the proper SET commands and merging it all to one it will be easier to understand so don't worry about it.. As for your question about the %Two% varablie I'll explain it now. set Two=%* set Two=%Modified%%Two:~2% The first Two grabs the Variable that beeing sent by the for loop call the second one what it does is that it deletes the first 2 characters (Ie: L: in this case) and replaces it with the drive letter of the Modified M: But don't worry about it I'll get it cleaned up and documented so that we all can improve on the code and have something we'll all enjoy. Shawn oloid: http://www.sandboxie.com/phpbb/viewtopic.php?p=73195#73195 Fri Oct 07, 2011 2:15 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=73195#73195 Oops, please ignore me. Reviewing, I see you've [u:167477d4ee]already stated[/u:167477d4ee] that you're preparing SET commands for easy customization. Also, by only thinking along one track (processes running in a sandbox) I failed to remember that you'd [u:167477d4ee]already stated[/u:167477d4ee] that closing SbieCtrl.exe (with taskkill) is needed to unlock the reghive. Even so, I suppose the "terminate" command would be good to run first as precaution. I'm sorry. I'm tired. Please don't take offense. I'll shut up now. oloid: http://www.sandboxie.com/phpbb/viewtopic.php?p=73194#73194 Fri Oct 07, 2011 1:44 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=73194#73194 Looking good, but I need to mention that SbieCtrl.exe is the GUI and doesn't even need to run ([url=http://www.sandboxie.com/index.php?ConfigureMenu#shell]see shell options[/url]), thus your taskkill command would not shut down a running sandbox. I suspect you should use a command like this instead: start /wait "C:\Program Files\Sandboxie\Start.exe" /box:TestBox /terminate See: http://www.sandboxie.com/index.php?StartCommandLine (stop) http://ss64.com/nt/start.html (/wait) Also, your batch skills are over my head but the doubled "set Two=" lines in :Modifiedsub and :Originalsub look like they might be a harmless copy/paste mistake. I dunno, you decide. I haven't used it and don't know it's limitations but I'm wondering if the SET command could be used to make customizing the batch files easier for the end user (though not for you). Imagining a set of SETs at the top of the file to define box names and paths and [u:fb0dbeede0]everything[/u:fb0dbeede0]. shawndion: http://www.sandboxie.com/phpbb/viewtopic.php?p=73178#73178 Fri Oct 07, 2011 9:50 am http://www.sandboxie.com/phpbb/viewtopic.php?p=73178#73178 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 oloid: http://www.sandboxie.com/phpbb/viewtopic.php?p=73164#73164 Fri Oct 07, 2011 4:29 am http://www.sandboxie.com/phpbb/viewtopic.php?p=73164#73164 Thanks for your efforts shawndion! Though you might not get a proper audience in this thread and this month I'm sure your work will be appreciated down the road. I look forward to testing and using your tools as I'd been planning to create some basic backup/restore batch files along with some pre-prepared 'base' sandboxes with specialized contents (mostly to do with different browsers and multiple configurations and different hosts files). Your scripts should offer greater sophistication and ease than I could have hoped for. That's all for now. God bless. shawndion: http://www.sandboxie.com/phpbb/viewtopic.php?p=73049#73049 Tue Oct 04, 2011 7:12 am http://www.sandboxie.com/phpbb/viewtopic.php?p=73049#73049 Hi DIGIT@L, Well in my case it's 3am right now and this is my dedication project. Part of the batch file will contain regdiff to make a patch registry (To go back and from a installation setting) the site is p-nand-q.com/download/regdiff.html (Reason why I'm posting the link is that the author is giving away a python script of his code) Play with it (Under Sandboxie even) the commands are amazing... As for the backup script I'm using FC to file compare folders and tskill,taskkill.. the next 3 days I'm tweaking it. The skeleton code is done it's just I want to make this OS specific and because not everyone installs their sandbox as a default I want to be able to have a "Set" configuration file people can modify for their need. And the reason is simple why I'm dedicating my time to this. Sandboxie is a amazing program that saved me already weeks of re-installations and tons of money (I use regdiff and sanboxie to make ultimate regclean tools) So the least I could do is help the community do the same. After this is done I'll concentrating on making a userguide as many people keep calling me for help on how to tweak sandboxie. I'll keep you all posted on the progrress as I seriously want to keep my mind off of things.. Shawn. D1G1T@L: http://www.sandboxie.com/phpbb/viewtopic.php?p=73045#73045 Tue Oct 04, 2011 12:25 am http://www.sandboxie.com/phpbb/viewtopic.php?p=73045#73045 [quote:61a962c8d5]I want to know exactly what you need from this tool... as of the Freeze, Backup, Restore, Save Changes, etc. Abuse of this suggestion... I'm available to work on this for a month.. [/quote:61a962c8d5] Thats a good selection features you thought of there. I would really love to see them in your addon at some point, but I don't want to burden you especially in your state now. If you can accomplish the cloning functionality that would be great for a start. I can tell you that on this forum, your work will be appreciated and you will gather a following really quickly around here :) shawndion: http://www.sandboxie.com/phpbb/viewtopic.php?p=73029#73029 Mon Oct 03, 2011 1:20 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=73029#73029 Thank you everyone ... now here's the part where it's your job.. I want to know exactly what you need from this tool... as of the Freeze, Backup, Restore, Save Changes, etc. Abuse of this suggestion... I'm available to work on this for a month.. Keep me busy the less I think the more healty it is for me.. Shawn P.S: I'm coding this all week I took a week off to get this done right...people need a tool to test and make a blacklist of softwares that cause more harm than good.. P.P.S: Your condolences are welcomed it was the family priest the man thought me gambling and arcades hence my love of computers ... in a instance this man made me who I am today... so if this project works well at least I'll have the opportunity to make him proud.. D1G1T@L: http://www.sandboxie.com/phpbb/viewtopic.php?p=72961#72961 Sat Oct 01, 2011 5:09 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=72961#72961 My condolences tzuk: http://www.sandboxie.com/phpbb/viewtopic.php?p=72958#72958 Sat Oct 01, 2011 3:58 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=72958#72958 I'm sorry to hear about your loss. And thank you for coming back to post this update. But there's no rush with this. Please, take your time and post when convenient. shawndion: http://www.sandboxie.com/phpbb/viewtopic.php?p=72955#72955 Sat Oct 01, 2011 3:03 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=72955#72955 Sorry folks for the long delay... there was only one thing that could cause me to be late on a task. Death in the familly :( I promise you all that by friday I'll have the batch file ready for all the OS's Shawn tzuk: http://www.sandboxie.com/phpbb/viewtopic.php?p=72662#72662 Wed Sep 21, 2011 6:07 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=72662#72662 Yes, I see. If I move the post into a new topic in Contributed Utilities forum, then it still has shawndion's name. Good point. D1G1T@L: http://www.sandboxie.com/phpbb/viewtopic.php?p=72623#72623 Tue Sep 20, 2011 4:51 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=72623#72623 I guess we have to wait and see how well it works first. ]]>Quoting tzuk: ]]>As for putting it in Contributed Utilities, I believe you can do that yourself as well. ]]> That wouldn't be right since I'd be taking credit for his work, so its best that you two decide what to do whenever it finsihed. It was merely a suggestion on my part. tzuk: http://www.sandboxie.com/phpbb/viewtopic.php?p=72612#72612 Tue Sep 20, 2011 6:55 am http://www.sandboxie.com/phpbb/viewtopic.php?p=72612#72612 Let's not get ahead of ourselves. The batch script has not actually been posted yet. As for putting it in Contributed Utilities, I believe you can do that yourself as well. D1G1T@L: http://www.sandboxie.com/phpbb/viewtopic.php?p=72594#72594 Tue Sep 20, 2011 12:58 am http://www.sandboxie.com/phpbb/viewtopic.php?p=72594#72594 Shawn does your implementation guarantee that installed programs work without problems in their cloned sandbox? Actually this might be really useful for using multiple copies of an executable configured in a specific way; ie running multiple copies of chrome running with a specific security/settings configuration than the instance installed on the OS. If it indeed does work, then Tzuk, can you please add this under contributed utilities with the .bat file and instructions listed as a tutorial under Contributed Utilities? Maybe have a settings page dedicated to this optional function, where it would be activated if the extension is downloaded from here. Kinda like how you have to setup Secure Delete from the settings page too. This also helps in the process of making portable apps IMHO. shawndion: http://www.sandboxie.com/phpbb/viewtopic.php?p=72584#72584 Mon Sep 19, 2011 7:06 am http://www.sandboxie.com/phpbb/viewtopic.php?p=72584#72584 Hi Tzuk I was away for the past 3 weeks.. I'll write something up with detailed instructions to share with everyone that wants to be able to have a goback feature with sandboxie.. it's a simple batch file for me to build.. I'll just make sure that it's XP, Vista and Windows 7 Compatible. Shawn tzuk: http://www.sandboxie.com/phpbb/viewtopic.php?p=71834#71834 Sat Aug 27, 2011 6:14 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=71834#71834 shawndion what you say sounds interesting, perhaps you can elaborate a bit on the exact implementation of your "snapshot/restore" system, so others can benefit from it. vzgoog: http://www.sandboxie.com/phpbb/viewtopic.php?p=71822#71822 Sat Aug 27, 2011 7:40 am http://www.sandboxie.com/phpbb/viewtopic.php?p=71822#71822 I like the idea of an option to "freeze" a sandbox and when finished have an option to revert to keep. shawndion: http://www.sandboxie.com/phpbb/viewtopic.php?p=66855#66855 Fri Apr 15, 2011 8:14 am http://www.sandboxie.com/phpbb/viewtopic.php?p=66855#66855 Actually to be honest in regards to making a image of the sandbox... A good old fashion xcopy batch file works great been using that with some of the great 3rd party tools on this site and I can make almost like a system restore type of implementation.. But right now I'm using "SaveGame Profiler" if you use it correctly you can actually do what you want and it manages things for you. It's surprising that some softwares that are made for something can be used for something else. And with some of the 3rd party apps we have here I can shrink theses packs I make to go back to a previous state... as I hate so badly to tweak a software and lose the best configurations.. And with RegHive import to be able to edit the main files (As sandboxie uses the same structure) I am also able to control what the softwares see... which in my book is amazing security. P.S: Best money I've ever spent was getting the Full Version of Sandboxie. Shawn D. SnDPhoenix: http://www.sandboxie.com/phpbb/viewtopic.php?p=66721#66721 Mon Apr 11, 2011 7:11 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=66721#66721 I don't think tzuk would add this feature, it's too much work for too little gain. I don't know many people who would find any use in this feature. Besides as far as I know, it isn't even possible to "freeze" just one app, you have to "freeze" the entire computer, as every bit of RAM needs to be saved to disk, not just one section of RAM. Correct me if I'm wrong though. :P Tester: http://www.sandboxie.com/phpbb/viewtopic.php?p=66716#66716 Mon Apr 11, 2011 6:33 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=66716#66716 I think that's a good idea! At time x, I would say: Freeze Sandbox. If all programs are finished or I say it explicitly, the sandbox is reset to the freeze-state. D1G1T@L: http://www.sandboxie.com/phpbb/viewtopic.php?p=62082#62082 Sat Dec 25, 2010 4:16 pm http://www.sandboxie.com/phpbb/viewtopic.php?p=62082#62082 Its out of sandboxie's scope and would be of little use. phoenix: Freeze/Snapshot Sandbox Contents http://www.sandboxie.com/phpbb/viewtopic.php?p=62076#62076 Sat Dec 25, 2010 6:49 am http://www.sandboxie.com/phpbb/viewtopic.php?p=62076#62076 This feature request would allow a user to Freeze/Snapshot the contents of a sandbox. The feature might be visually presented in a similar fashion to the Snapshot feature found in VirtualBox. To cut down on snapshot size, an implementation might potentially only version the incremental changes from the previous snapshots. Right now, I zip my sandbox and delete/restore before running to simulate this 'snapshot' feature. The idea would be to prevent subsequent changes made in the sandbox from being permanently added to the sandbox. Thoughts?