how to move a Sandbox to another Sandboxie

Post Reply
User avatar
boxinator
Posts: 11
Joined: Wed Feb 28, 2024 11:13 am

how to move a Sandbox to another Sandboxie

Post by boxinator »

For admin-reasons, I have installed several copies of Sandboxie+ on my Windows 10 machine, in different locations. For each installation I had opted for the option:

Code: Select all

Extract all files to a directory for portable use
Now I have since learnt elsewhere in this forum, that I cannot not (as hoped) run several instances of Sandboxie in parallel. Now I need to re-configure.

I was told I can hold and run several Sandboxes in each installation of Sandboxie+ and that is indeed working fine.


Now I would need to move several Sandboxes from different portable installations in several folders to one central installation.


In the menu I can see an option to "Import Box" but I cannot find an option to export, neither in the menu, nor in the documentation.


Can I move a Sandbox to another Sandboxie+ portable installation?

How is it done best?



I have considered just moving the folders in my file-explorer and then editing the setting.ini, but I do not know if that is sufficient and what side-effects to expect.

Context: We are talking about important financial data for actual production, not some tests.
Who let the bugs out, who who who?

User avatar
boxinator
Posts: 11
Joined: Wed Feb 28, 2024 11:13 am

I did a workaround - still curious about an answer

Post by boxinator »

Update:

I have to keep working. So I took a deep breath and created an all new setup from scratch in one neutral location.

I had to configure Sandboxie again.

And I had to create and configure and "load with programs" five brand new Sandboxes.


It was worth it. Yesterday I had learnt a lot - also from this forum - and now I am working on my finances, to catch up.


Still would like to learn how to move things. One day there will be a new computer. Or I might need to pass certain projects to a replacement accountant for whatever reasons.
Who let the bugs out, who who who?

User avatar
bastik-1001
Posts: 405
Joined: Sat Apr 22, 2023 8:30 am
Contact:

Re: how to move a Sandbox to another Sandboxie

Post by bastik-1001 »

First, locate your sandboxes and copy them to some other location, just to back them up. In the default state, those are stored at C:\Sandbox\, but you can see the path in the main window, right at "Path/Command Line". Otherwise, you can find the default location in Sandboxie-Plus' global settings, under the entry "Advanced Config" and the tab [Sandboxie Config], where it is listed as "Sandbox file system root". If you used a custom path for a sandbox its FileRootPath is stored in the ini.

Each portable extraction of Sandboxie-Plus should contain a Sandboxie.ini, which you should also back up. This ini is where the settings for each sandbox are stored. (The plus-ini stores GUI related settings and can be ignored.)

To show all sandboxes in one instance of Sandman.exe (the sandbox manager of Sandboxie-Plus) all sections of the sandbox.inis need to be in the sandbox.ini of the instance you are going to use. The names of the sandboxes need to be different.

Code: Select all

[Office]

Enabled=y
ConfigLevel=10
AutoRecover=y
BlockNetworkFiles=y
Template=FileCopy
Template=SkipHook
Template=qWave
(...)

[New_Box_1]
Enabled=y
BlockNetworkFiles=y
RecoverFolder=%Personal%
RecoverFolder=%Desktop%
BorderColor=#02f6f6,ttl,6
Template=OpenBluetooth
Template=SkipHook
Template=FileCopy
Template=qWave
Template=BlockPorts
Template=LingerPrograms
Template=AutoRecoverIgnore
ConfigLevel=10
(...)
Sandboxes are normally created like:

Code: Select all

C:\Sandbox\%username%\%sandboxname%
For example:

Code: Select all

C:\Sandbox\%username%\New_Box_1
All entries should point to the correct sandbox if the names are kept. In case of collisions, one needs to be named differently, and the files have to be copied from the back-up into the desired sandbox.

BTW, the option to export a sandbox requires you to right-click on a sandbox in the main window of Sandman.exe and select Sandbox Tools > Export Box, which then can be imported. I am not aware how Sandman handles name-collisions when one attempts to import a box with the same name.

User avatar
boxinator
Posts: 11
Joined: Wed Feb 28, 2024 11:13 am

Re: how to move a Sandbox to another Sandboxie

Post by boxinator »

Thank you, very helpful and clear write-up for a move.

I have already re-created everything today at noon-time. But I will bookmark this answer, because in our project things can change every so often. I have a hunch that I will be glad about this in the future.

It could even become a page in the "real documentation".
Who let the bugs out, who who who?

User avatar
bastik-1001
Posts: 405
Joined: Sat Apr 22, 2023 8:30 am
Contact:

Re: how to move a Sandbox to another Sandboxie

Post by bastik-1001 »

My reply is partly outdated as you started over, there is no need to piece thing together, but things that hold true:
  • Sandboxie.ini contains all the settings relevant to the sandboxes, having any Sandboxie use that Sandboxie.ini will have these sandbox settings
  • The folders that contain the sandboxes contain all files required, copied to the right location or configuring a custom path in the Sandboxie.ini makes them available to any instance of Sandboxie.
  • Boxes can be exported via right-clicking on the sandbox in the sandbox manager.
  • Boxes can be imported via the menu entry or the toolbar button.
Moving sandboxes around might not be fully portable, for example when they are separated by users and users are named differently. Or if a future Windows version changes something, although that should not happen, as they would probably keep compatibility intact.

Huntington
Posts: 1
Joined: Wed Mar 20, 2024 5:50 pm

Re: how to move a Sandbox to another Sandboxie

Post by Huntington »

Hey there,

thank you for the support. I have a slightly different case. I would like to move a sandbox from a portable folder into an installed version. I hope, this is possible without using the export and import function.

Assuming, that the process is similar, to move sandboxes from a portable folder to an other portable folder, I did the following:
  • 1. I moved the portable sandboxfolder (containing RegHives, DONT-USE.TXT, user folder ect.) into the sandbox folder:

    Code: Select all

    C:\Sandbox\<username>\
  • 2. I found a sandboxie.ini, that I suspect to be the ini of the local installation in:

    Code: Select all

    C:\Windows\Sandboxie.ini
    It contains sections for every sandbox in the installed sandboxie version.
  • 3. I closed all running processes of sandboxie
  • 4. I copied the corresponding section of the sandbox I want to move from the portable folders sandboxie.ini into the ini of the local installed version
  • 5. I restarted the computer
But the moved sandbox does not show up inside SandMan.exe.
What can I do, to change that?

User avatar
bastik-1001
Posts: 405
Joined: Sat Apr 22, 2023 8:30 am
Contact:

Re: how to move a Sandbox to another Sandboxie

Post by bastik-1001 »

Step 1 should be correct.
Step 2 assumes correctly that the default place for Sandboxie.ini is C:\Windows.
Step 3 good to close them so they don't have a handle on the file you want to write to.
Step 4 should work.
Step 5 shouldn't be required as long as the configuration of the installed version is reloaded. (Main window > Option > "Reload Configuration") (The cog wheel with the curved arrows around it.)(Or restarting Sandboxie, should make it reload the configuration as well.)

Now, you should have done everything to make it work. At the very least, you should have the names of the sandboxes show up in the main window of Sandman, even if those would not be connected to the folder.
[...]the moved sandbox does not show up inside SandMan[...]
Taking that as I understand it, you don't see their entries at all. Names of sandboxes should be unique, upon creation Sandboxie takes care of that, but I don't know how it handles imports or adding sandboxes with the same name. Although the folders would normally be named the same, so you would have seen that there was a collision of names. The rectangular brackets [<sandboxname>] have to be copied, too. Sorry, but are you sure that the Sandboxie.ini could be saved properly? It's just that I don't know what I am missing.

Assuming it being meant differently, you could try to set the path you copied them to via

Code: Select all

FileRootPath=<pathtothesandbox>
but what you wrote seems to be clear, so I will not elaborate on that, for now.

Edit: Even considering that the copied entries contained custom "filerootpaths", the names of the sandboxes would still show up, just not their files.

User avatar
bastik-1001
Posts: 405
Joined: Sat Apr 22, 2023 8:30 am
Contact:

Re: how to move a Sandbox to another Sandboxie

Post by bastik-1001 »

Putting aside the copying for a moment.

Manually adding:

Code: Select all

[demotest]

Enabled=y
BlockNetworkFiles=y
BorderColor=#02f6f6,ttl
Template=OpenBluetooth
Template=SkipHook
Template=FileCopy
Template=qWave
Template=BlockPorts
Template=LingerPrograms
Template=AutoRecoverIgnore
ConfigLevel=10
UseFileDeleteV2=y
UseRegDeleteV2=y
to your Sandboxie.ini, should cause Sandman to show a sandbox with the name "demotest". Not every line might be needed for a valid box, but just to test it.

Post Reply