Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SandMan: Explorer context menu does not work directly after a clean installation on Windows 11 #2284

Closed
APMichael opened this issue Sep 27, 2022 · 26 comments
Labels
Issue: Reproduced Issue reproduced without uncertainties SbieDll Collection of SbieDll.dll issues Status: Fixed in Next Build Fixed in the next Sandboxie version Win 11 Windows 11 issues

Comments

@APMichael
Copy link
Contributor

APMichael commented Sep 27, 2022

Describe what you noticed and did

With a clean reinstallation, the Explorer context menu (shell integration) usually only works after a restart of Windows.

Clean VM (running Windows 11, 21H2, 64-bit):

1.) Download and install the latest version of Sandboxie-Plus (v1.3.4, 64-bit).
2.) Click through the Setup Wizard "Personally", leaving everything at default values.
3.) Wait until the entry "Open Sandboxed" is added to the Explorer context menu.
4.) Run e.g. "Microsoft Edge" in the DefaultBox via the Explorer context menu.
5.) The execution does not work, but the following error messages are displayed:

sandboxie_context_w11_b

Start.exe (1504): SBIE2112 Object is not accessible: \Sessions\1\BaseNamedObjects\SM0:1504:120:WilError_03, call CreateMutant (C0000022) access=001F0001 initialized=1

After restarting Windows, it then works as it should.

Note: Update 1 #2284 (comment)
Note: Update 2 #2284 (comment)
Note: Update 3 #2284 (comment)

How often did you encounter it so far?

With each clean reinstall of Sandboxie Plus.

Affected program

Not relevant

Download link

Not relevant

Where is the program located?

Not relevant to my request.

Expected behavior

The Explorer context menu should work correctly immediately (as under SbieCtrl) or the user should be prompted to restart.

What is your Windows edition and version?

Windows 11 Pro, 21H2, 64-bit

In which Windows account you have this problem?

User account with UAC protection set to Always notify.

Please mention any installed security software

Microsoft Defender Antivirus

What version of Sandboxie are you running?

1.3.2-1.6.3

Is it a new installation of Sandboxie?

I recently did a new clean installation.

Is it a regression?

No response

In which sandbox type you have this problem?

Not relevant to my request.

Can you reproduce this problem on an empty sandbox?

Not relevant to my request.

Did you previously enable some security policy settings outside Sandboxie?

No response

Crash dump

No response

Trace log

No response

Sandboxie.ini configuration

No response

@APMichael APMichael added the Confirmation Pending Further confirmation is requested label Sep 27, 2022
@APMichael APMichael changed the title SandMan: Context menu only works after a restart of Windows 11 SandMan: Explorer context menu only works after a restart of Windows 11 Sep 27, 2022
@isaak654 isaak654 added the Win 11 Windows 11 issues label Sep 27, 2022
@okrc
Copy link
Contributor

okrc commented Sep 27, 2022

This problem is not very relevant to your description, it only occurs when SandMan exits. You may have triggered it by chance.

@APMichael
Copy link
Contributor Author

This problem is not very relevant to your description, it only occurs when SandMan exits. You may have triggered it by chance.

I can reliably reproduce the issue 100% after each reinstall. It has nothing to do with whether SandMan is exited, but occurs immediately after installation and initial setup. Exactly as I described it above. There is also no chance involved here.

I certainly do not create an issue report just because an issue occurred once and by chance!

@okrc
Copy link
Contributor

okrc commented Sep 27, 2022

Sorry, maybe it's a language problem, I can't understand and reproduce your question. It would be nice to have a video demonstration. But I think this problem can be easily reproduced by exiting SandMan. This should be the same problem.

@APMichael
Copy link
Contributor Author

Sorry, maybe it's a language problem, I can't understand and reproduce your question ...

Never mind, English is not my native language either. Thanks for your reply anyway.

@APMichael
Copy link
Contributor Author

APMichael commented Sep 27, 2022

A small update:

I can confirm the procedure of @okrc . The error message about the "initialization of the SbieDll.dll" can also be triggered by simply exiting SandMan (using "Sandbox" > "Exit") and then trying to start e.g. "Microsoft Edge" via the Explorer context menu. (Important: do not restart SandMan.)

In addition, with the procedure I gave above, a restart of Windows can be bypassed if you use "Sandbox" > "Maintenance" > "Stop All" instead and restart SandMan afterwards. --- Edit: With v1.3.5 something seems to have improved. It seems that even exiting (using "Sandbox" > "Exit") and restarting SandMan is sufficient for the issue to disappear after a clean reinstallation. This was definitely not the case before.

@APMichael APMichael changed the title SandMan: Explorer context menu only works after a restart of Windows 11 SandMan: Explorer context menu does not work directly after a clean installation on Windows 11 Sep 27, 2022
@APMichael
Copy link
Contributor Author

In v1.4.0, the Explorer context menu does not seem to work at all.

The setting "Add 'Run Sandboxed' to the explorer context menu" is also no longer ticked under "Global Settings" > "Shell Integration". If you tick the setting, the tick will be removed immediately as soon as you click on "Apply".

@DavidXanatos
Copy link
Member

In v1.4.0, the Explorer context menu does not seem to work at all.

The setting "Add 'Run Sandboxed' to the explorer context menu" is also no longer ticked under "Global Settings" > "Shell Integration". If you tick the setting, the tick will be removed immediately as soon as you click on "Apply".

oh I'm sorry about that, I think its caused by the extension file not being signed either, i have to make a memo to myself to not only incluse a signed driver but also to always deploy a signed version of the extension

try grabbing SbieShellExt.dll and SbieShellPkg.msix from build 1.3.5 an try with those I'm pretty sure than it will work.

@APMichael
Copy link
Contributor Author

... try grabbing SbieShellExt.dll and SbieShellPkg.msix from build 1.3.5 an try with those I'm pretty sure than it will work.

Thank you for your reply. Yes, with the replaced files the Explorer context menu works again. 👍

Then only the issue reported here with the SbieDll.dll error message remains. The easiest way to trigger this is to exit SandMan and then try to run a program in a sandbox via the Explorer context menu.

@isaak654 isaak654 pinned this issue Oct 11, 2022
@isaak654

This comment was marked as off-topic.

@DavidXanatos

This comment was marked as off-topic.

@APMichael
Copy link
Contributor Author

APMichael commented Oct 14, 2022

The issue with PowerToys seems to be related only to the insertion of the context menu entries. With Sandboxie, this takes a few seconds, then the entries are reliably present.

The issue with Sandboxie is a different one: With the current versions of Sandboxie, it is now sufficient to simply exit SandMan once and start it again for the context menu to work without errors. (Without a restart of SandMan there are always the error messages mentioned above.)

In addition, the SbieDll.dll error message always occurs as soon as you exit SandMan and then try to run a program in a sandbox via the context menu. Unfortunately, a reboot does not change this and the SbieDll.dll issue with a non-running SandMan should therefore please be fixed.


@DavidXanatos The issue after a clean installation could be solved like this: After the Setup Wizard has finished and the Compatibility window has been confirmed, SandMan must be automatically exited and restarted under Windows 11. The time does not matter, i.e. the Sandboxie entries do not have to be present in the context menu yet. This is sufficient for the context menu to work without errors after installation.

For the issue with the SbieDll.dll error when SandMan is not running (on Windows 11), you need to find out the exact cause.

@DavidXanatos
Copy link
Member

@APMichael i see, will look into it asap

@APMichael
Copy link
Contributor Author

I have probably figured out what is causing the issue after a reinstall:

The installation is executed with administrator rights (elevated). At the end of the installation, SandMan is then started by the installation program, but also elevated. However, the Sandbox selection window called by the context menu entry starts a non-elevated SandMan. The two SandMan processes can apparently not communicate with each other and therefore the error message SBIE2112 occurs.

sandboxie_sandman_context

To reproduce the issue, it is no longer necessary to reinstall Sandboxie, it is sufficient to exit SandMan and then restart it with administrator rights (elevated). Starting e.g. "Microsoft Edge" via the context menu then triggers the same errors as after a reinstallation of Sandboxie.

@boromyr
Copy link

boromyr commented Nov 8, 2022

Same exact problem, even with 1.5.3. Windows 11, UAC disabled.

@DavidXanatos DavidXanatos added the Priority: High To be done as soon as possible label Nov 8, 2022
@DavidXanatos
Copy link
Member

It was not a high priority issue we have anough of those to fix already, but I'll look to fix this for 1.5.4

@lemaximedu66
Copy link

i have the same issue.

@ghost

This comment was marked as off-topic.

@ghost

This comment was marked as off-topic.

@boromyr
Copy link

boromyr commented Nov 20, 2022

@DavidXanatos

try grabbing SbieShellExt.dll and SbieShellPkg.msix from build 1.3.5 an try with those I'm pretty sure than it will work.

I tried this suggestion but the problem persists, the context menu only works if the sandboxie plus gui is running.

@DavidXanatos DavidXanatos added the Status: Fixed in Next Build Fixed in the next Sandboxie version label Nov 20, 2022
@isaak654 isaak654 unpinned this issue Nov 27, 2022
@APMichael
Copy link
Contributor Author

APMichael commented Nov 28, 2022

Unfortunately, only the original issue, as described in the title, has been fixed. The other two issues unfortunately still exist!

Issues not fixed:

1.) Exit SandMan and then try to run a program in a sandbox via the Explorer context menu. > SbieDll.dll error message!

I can confirm the procedure of @okrc . The error message about the "initialization of the SbieDll.dll" can also be triggered by simply exiting SandMan (using "Sandbox" > "Exit") and then trying to start e.g. "Microsoft Edge" via the Explorer context menu. (Important: do not restart SandMan.)

2.) Exit SandMan and then run SandMan as administrator. Try to run a program in a sandbox via the Explorer context menu. > SbieDll.dll and SBIE2112 error message!

To reproduce the issue, it is no longer necessary to reinstall Sandboxie, it is sufficient to exit SandMan and then restart it with administrator rights (elevated). Starting e.g. "Microsoft Edge" via the context menu then triggers the same errors as after a reinstallation of Sandboxie.

@isaak654 isaak654 reopened this Nov 28, 2022
@isaak654 isaak654 removed the Status: Fixed in Next Build Fixed in the next Sandboxie version label Nov 28, 2022
@isaak654 isaak654 pinned this issue Nov 28, 2022
@lemaximedu66
Copy link

still not fixed !

@DavidXanatos
Copy link
Member

I think I have an idea what might cause the SbieDll.dll issue you see the shell menu dll for win 11 is installed as a modern app package a so called sparse packet, and when it starts sandman.exe and it does not find an existing instance the new sandman running associated with the app package executes start.exe the token gets propagated down the line and ultimately once it reaches the sandbox causes a problem.

in the next build there will be a fix for that, the service will check if the caller's token belongs to an app package and if so generate a new user token for the logged in session.

@DavidXanatos DavidXanatos added Status: Fixed in Next Build Fixed in the next Sandboxie version Issue: Reproduced Issue reproduced without uncertainties and removed Confirmation Pending Further confirmation is requested labels Dec 23, 2022
@isaak654 isaak654 added SbieDll Collection of SbieDll.dll issues and removed Priority: High To be done as soon as possible labels Dec 23, 2022
@boromyr
Copy link

boromyr commented Dec 31, 2022

I solved it like this for the memento:


[HKEY_CLASSES_ROOT\*\shell\unbox]
@="Avvia all'&esterno dell'area virtuale"
"Icon"="C:\\Program Files\\Sandboxie Plus\\SandMan.exe,0"
"MUIVerb"="Avvia nell'area virtuale"

[HKEY_CLASSES_ROOT\*\shell\unbox\command]
@="\"C:\\Program Files\\Sandboxie Plus\\Start.exe\" /box:DefaultBox \"%1\" %*"

Update to the desired language and with the correct installation path.

@isaak654
Copy link
Collaborator

1.6.4 is out, could you revert any workaround and confirm the fix?

@APMichael
Copy link
Contributor Author

The two remaining issues have been successfully fixed! 👍 Many thanks for that.

@lemaximedu66
Copy link

fixed 👍🏻 thanks !

@isaak654 isaak654 unpinned this issue Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Reproduced Issue reproduced without uncertainties SbieDll Collection of SbieDll.dll issues Status: Fixed in Next Build Fixed in the next Sandboxie version Win 11 Windows 11 issues
Projects
None yet
Development

No branches or pull requests

6 participants