copy or duplicate sandbox

Ideas for enhancements to the software
yakir.zadok@gmail.com

copy or duplicate sandbox

Post by yakir.zadok@gmail.com » Sat Feb 16, 2008 3:46 pm

I didn't find a way to copy / duplicate a sandbox, this feature can be used to like starting a sandbox in sandbox (this feature also not supported I think).

is there a way doing it?

street011
Posts: 412
Joined: Tue Jan 16, 2007 2:08 pm

Post by street011 » Sun Feb 17, 2008 1:55 pm

it's actualy very easy, create a new sandbox, "Sandbox2" (for example) now "Explore" your "DefaultBox" copy it's content to the "Sandbox2" folder...
there is your duplicate

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Tue Feb 26, 2008 5:26 am

Thanks! I mentioned this solution in the rollback request so people there would know about it.

Nevertheless, can you add an interal option to do this? It would be a great feature for registered users. street011's manual way would be problematic when you want a sandbox with "Delete Invocation" on (deletets itself when being closed). Nothing would then beat quickly right clicking the program's icon and choosing "duplicate sandbox X".

Until then, one could use the following "xcopy" command in "Delete Invocation".
Last edited by lwc on Fri Dec 18, 2009 6:00 pm, edited 5 times in total.

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Fri Feb 29, 2008 7:05 am

Can anyone confirm I wrote all the relevant xcopy parameters that would create a 100% tree copy?

I had to use xcopy because copy would only copy either files or folders (if they're in the same folder - e.g. sandbox\file.txt and sandbox\folder\).

yakir.zadok@gmail.com

copy or duplicate sandbox

Post by yakir.zadok@gmail.com » Fri Feb 29, 2008 1:17 pm

the idea of xcopy is not enough,
I need to delete all created files and directories.
how can I delete files that has been changed since a TIME?
and then copy only the mised files?

the idea of copy all the sandbox is 3 GB again and again and rooin the HD.

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Fri Feb 29, 2008 1:52 pm

You're the one who wanted duplication and so this topic is about duplication.

If you suddenly want to request a rollback feature, just join the relevant topic (linked above).

yakir.zadok@gmail.com

copy or rollback

Post by yakir.zadok@gmail.com » Sat Mar 01, 2008 5:42 am

lwc wrote:You're the one who wanted duplication and so this topic is about duplication.

If you suddenly want to request a rollback feature, just join the relevant topic (linked above).
the idea of mine was to do a kind of rollback,
So I will continue posting to the roll back forum

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Tue Mar 04, 2008 7:22 am

Hmm, it turns out that unlike "Delete Command", "Auto Exec" is an internal command (within the sandbox's scope) so it's no good for duplicating sandboxes.

Does Sandboxie supply an external equivalent for it?

Until I get an answer, here's a less efficient - but nonetheless a working - version of duplicating (a sandbox named "SavedBox") - via the external "Delete Command":
"%ComSpec%" /c rmdir /s /q "%SANDBOX%" && for /F "tokens=3 delims=_" %A IN ("%SANDBOX%") do xcopy "%SystemDrive%\Sandbox\%USERNAME%\%A_Dummy" "%SystemDrive%\Sandbox\%USERNAME%\%A" /e /i /h /k /x
(thanks for Tzuk for coming up with the %A thing!)
That way you can have "Foobar" and "Foobar_Dummy", and upon deleting "Foobar" it would get restored to "Foobar_Dummy".

P.S.
xcopy wrote:/x
Don't use this xcopy parameter in Windows XP Home as it gets the relevant sandbox (%A)'s folder locked!
Last edited by lwc on Fri Feb 12, 2010 5:22 am, edited 8 times in total.

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Mon Aug 18, 2008 6:28 am

v2.29.22 beta somehow interfered with xcopy. I have no idea why and how, but the above command doesn't work anymore.

Actually, if I turn off Sandboxie (including the service) and run
xcopy "c:\Sandbox\myuser\Box_Dummy" "c:\Sandbox\myuser\Box\" /e /i /h /k /x
Then it says 0 files copied, but this is created:
c:\Sandbox\myuser\Box_Dummy\drive\C\Box
However, using double quotes somehow fixes the problem:
xcopy ""c:\Sandbox\myuser\Box_Dummy"" "c:\Sandbox\myuser\Box\" /e /i /h /k /x
And thus the new command is:
"%ComSpec%" /c rmdir /s /q "%SANDBOX%" && for /F "tokens=3 delims=_" %A IN ("%SANDBOX%") do xcopy ""c:\Sandbox\%USERNAME%\%A_Dummy"" "c:\Sandbox\%USERNAME%\%A\" /e /i /h /k /x
I'm telling you, it wasn't like this moments before installing v2.29.22 beta (including a restart just to make sure).
Last edited by lwc on Thu Dec 10, 2009 7:34 pm, edited 1 time in total.

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Mon Aug 18, 2008 8:08 am

Version 3.29.22 extends the new logic in ForceFolder to the sandbox folder. In other words if you had

xcopy c:\some\forced\folder

then the new logic in ForceFolder can catch that. You're doing

xcopy c:\sandbox\folder

so it is essentially caught by the same logic. By using double-quotes you fooled the new logic to not catch the invocation.
tzuk

lwc
Posts: 332
Joined: Tue Dec 19, 2006 6:37 am

Post by lwc » Mon Aug 18, 2008 9:42 am

If the sandboxes are now like forced folders, then:
1) How come they're still forced folders even if Sandboxie (including the service) is turned off?
2) If it affects xcopy, how come the delete command works (it just deletes the folder)?

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Mon Aug 18, 2008 10:34 am

I think the new ForceFolders (including its application to sandboxed folders) is a bit over-protective. I will revise it and I hope it will resolve problems like this.
tzuk

MitchE323
Posts: 2268
Joined: Thu Nov 02, 2006 9:32 am

Post by MitchE323 » Mon Aug 18, 2008 4:40 pm

tzuk wrote:is a bit over-protective.
I have seen this as well. In a sandbox that has limited 'run_access', right clicking to produce a menu on a file in a forcefolder from an UNsandboxed Windows Explorer gives a rundll32 error. Same sandbox with limited run_access but with ForceProcess shows no error. Also ForceFolder with Foxit seems to have a different effect than ForceProcess with Foxit, in a box with limited run_access. ForceFolder requires Foxit to be listed in the ProcessGroup, while ForceProcess just lets IE do it.

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Wed Aug 20, 2008 12:23 pm

Version 3.29.23 should have more reasonable behavior.

Mitch, if you still have problems with version 3.29.23, then I'd need to better understand what's this "limited run_access" thing you're talking about.
tzuk

MitchE323
Posts: 2268
Joined: Thu Nov 02, 2006 9:32 am

Post by MitchE323 » Wed Aug 20, 2008 3:15 pm

tzuk wrote:Version 3.29.23 should have more reasonable behavior.

Mitch, if you still have problems with version 3.29.23, then I'd need to better understand what's this "limited run_access" thing you're talking about.
Still the same for me.

Details
------------------------------------------------------------------------------------
[GlobalSettings]

ProcessGroup=<Foxit>,Foxit Reader.Exe,sandboxiedcomlaunch.exe,sandboxierpcss.exe,start.exe

[Foxit]

Enabled=y
ConfigLevel=4
ClosedIpcPath=!<Foxit>,*
ForceFolder=C:\Program Files\Foxit Reader
------------------------------------------------------------------------------------
In your Foxit folder place any existing pdf file, also create a NewTextDocument.txt. Now in an UN-sandboxed Windows Explorer navagate to the Foxit folder. RightClick on the Pdf and 'Open With...' - also RightClick on the Txt and 'Open With' > 'Choose Program'. Both should create a Rundll32.Exe error notification. For this using the Foxit folder is just an example.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest