Page 1 of 1

Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Tue Mar 06, 2018 3:06 pm
by sbf
Win 7 32-bit.
Sandboxie v5.22 32-bit.
EmEditor (Latest version).
Tested on a "naked" OS.

For example, EmEditor has a command: Reset All Settings, which removes all its registry data (along with the files for settings) and restarts the app.

However, in a Sandboxie sandbox, EmEditor can never reset its registry settings. When restarted, it uses the old window size and position, for example.

I guess the procedure is:
The sandboxed EmEditor did remove its sandboxed registry data. But as it restarts, Sandboxie fetches the old registry data from outside.

FYI,
Comodo sandbox does not have such a problem. It seems Comodo sandbox adds a mark for the removed registry data:
Type: 0x39c0
Data: (zero-length binary value)

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Tue Mar 06, 2018 3:20 pm
by Barb@Invincea
Hello sbf ,

Please provide the required information:
viewtopic.php?f=11&t=19746

According to the devs, if you delete a key in Sbie, it will be deleted --> not read from host.
If you clear the sandbox, it will be read from host instead. Are you clearing the contents of your Sandbox?

Regards,
Barb.-

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Tue Mar 06, 2018 3:54 pm
by Curt@invincea
sbf wrote:
Tue Mar 06, 2018 3:06 pm
FYI,
Comodo sandbox does not have such a problem. It seems Comodo sandbox adds a mark for the removed registry data:
Sandboxie does the same thing.

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Tue Mar 06, 2018 4:04 pm
by sbf
Barb@Invincea wrote:
Tue Mar 06, 2018 3:20 pm
Are you clearing the contents of your Sandbox?
No.
EmEditor resets and restarts at once.
Hope you give it a test on EmEditor.

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Tue Mar 06, 2018 4:25 pm
by Barb@Invincea
Hello sbf ,

In order to test this behavior I need to know what are you doing, exactly.
Please provide repro steps, include any workspaces you may be using, changes you are looking at, and how are you resetting the application.

Regards,
Barb.-

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Tue Mar 06, 2018 5:27 pm
by sbf
OK. Thank you.

Install EmEditor (Installer version, which will use the registry).
Run EmEditor outside (with default settings). Change its window size/position.
(Restart EmEditor. It should use the changed size/position.)

Run EmEditor in a sandbox.
Use the menu: Tools > All Commands.
Then in the (All Commands) popup menu: Tools > Reset All Settings.
Follow the prompts.

After restarted, EmEditor should use the default window size/position (if you don't have my issue).

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Wed Mar 07, 2018 1:43 pm
by Barb@Invincea
Hello sbf,

I see the behavior. The window size is still remembered, even after using "Reset all settings".
I have made the devs aware.

As a workaround you can add the following entry under the desired Sandbox:
Open Sandboxie Control
Configure --- > Edit configuration
Find the Sandbox you wish to modify and add this at the end:
WriteKeyPath=HKEY_CURRENT_USER\Software\EmSoft

Save the changes.
Configure--> Reload configuration
Re-try launching your program Sandboxed and resetting all settings.

Here's more info regarding the WriteKeyPath setting:
https://www.sandboxie.com/WriteKeyPath
https://www.sandboxie.com/ResourceAccessSettings#key

Regards,
Barb.-

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Thu Mar 08, 2018 6:45 am
by sbf
Thanks for the info. I see.

I'm curious about the reason of the issue. Could you please explain it a little?

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Mon May 21, 2018 8:57 am
by sbf
Hi again,

Is this a "global" issue that affects any app?

For example,
My default browser is not IE.
I tried setting IE as default in a sandbox via "Internet Options" dialog:
Image

Click "Make default" and the button is disabled.
But close and open the dialog again. The button is enabled again.

And, if the "Tell me if ..." option is turned on, IE will prompt every time it starts, though it Is the default browser already in the sandbox.

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Mon May 21, 2018 10:12 am
by Guest10
sbf wrote:
Tue Mar 06, 2018 3:06 pm
However, in a Sandboxie sandbox, EmEditor can never reset its registry settings. When restarted, it uses the old window size and position, for example.
This is the expected behaviour. Sandboxie not only keeps copies of changed files inside of the sandbox, unless an exclusion setting allows them out, but it also keeps registry changes confined to the sandbox - unless an exclusion is set at:
Sandbox Settings > Resource Access > Registry Access
I would use "Direct Access" (OpenKeyPath).
Look at templates.ini in Sandboxie's Program Files folder, and you will see plenty of OpenKeyPath settings used in the pre-defined templates.

Registry changes for the sandboxed program are kept in the Reghive files, inside of the sandbox. So any Registry changes that are made by the sandboxed program stays in those files, and is deleted when the sandbox contents are deleted.
The Reghive is mounted to the "real" Registry whenever the sandbox is in use, and dismounted when the sandbox is not in use.

You can examine the Registry changes by using the Registry Editor (regedit.exe) while the sandbox is in use, at:
HKEY_USERS\Sandbox_...

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Tue May 22, 2018 1:27 am
by sbf
@Guest10
Thank you for the reply but please read through the whole thread to get what we are talking about exactly.
And please compare it with Comodo sandbox if available.

Re: Sandboxie could cause a sandboxed app fail to reset its registry settings

Posted: Thu May 24, 2018 12:39 pm
by Barb@Invincea
Hello sbf ,

We cannot repro the IE behavior. After setting it to Default and re-launching it inside Sbie, the button is grayed out.
Be sure that your sandbox is not set to delete contents when you close an app , and then re-try (if possible, please test in a new sandbox with default settings).
Please let us know the outcome.

Regarding the other comment, both Guest10 and I have provided you with options to achieve what you requested. Here's a full list of registry access options for Sandboxie: https://www.sandboxie.com/ResourceAccessSettings#key

Regards,
Barb.-