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

Windows Shortcuts Issues (with OpenFilePath?) #3610

Open
IntrepidWanderer opened this issue Feb 8, 2024 · 6 comments
Open

Windows Shortcuts Issues (with OpenFilePath?) #3610

IntrepidWanderer opened this issue Feb 8, 2024 · 6 comments
Labels
Workaround Temporary or alternative solution

Comments

@IntrepidWanderer
Copy link

Describe what you noticed and did

  1. Put installer inside folder in sandbox. Run installer and installed a program (e.g. FirefoxPortable) into a folder C:\OtherPrograms under a sandbox that has OpenFilePath enabled.
  2. Create a shortcut in Windows pointing to the program with the target line (nothing entered in "start in" line. Also Windows apparently has no issue finding the program when I browse to it as the location for the icon to be used for the shortcut):
    "C:\Program Files\Sandboxie-Plus\SandMan.exe" /box:ProgramLUse "C:\Sandboxes\ProgramLUse\drive\C\OtherPrograms\FirefoxPortable\FirefoxPortable.exe"
    Screenshot Sandboxie FFPortable Shortcut Properties
  3. Attempt to start said program by running/double clicking shortcut. Windows pops up an error saying

Sandboxie Start

Could not invoke program:

"C:\Sandboxes\ProgramLUse\drive\C\OtherPrograms\FirefoxPortable\FirefoxPortable.exe"

System Error Code:

The system cannot find the file specified.
(2)

  1. The above happens with any programs, including if I copy and move a program directly into the folder inside the sandbox, or with programs that have installers which automatically creates a desktop/start menu shortcut. I have Sandboxie setting for automatically adding sandbox shortcuts to the start menu enabled, and the start menu shortcuts created by Sandboxie have the same issue for programs in the folder that has "OpenFilePath" enabled.

How often did you encounter it so far?

Always, appears to happen for any shortcuts created for programs within the same folder of the same sandbox

Expected behavior

I expect the Windows shortcut to successfully start up the program it's pointing to while running under Sandboxie in the sandbox specified.

Affected program

All

Download link

N/A

Where is the program located?

The program is installed only inside a sandbox (NOT in the real system anyway).

Did the program or any related process close unexpectedly?

No, not at all.

Crash dump

No response

What version of Sandboxie are you running now?

Sandboxie v1.12.9 x64

Is it a new installation of Sandboxie?

I just updated Sandboxie from a previous version (I remember which one it is).

Is it a regression from previous versions?

Exists in an odd way in 1.12.7 (odd because it seems to come and go, not sure what specific Sandboxie setting I changed or did to make it go away)

In which sandbox type you have this problem?

In a standard isolation sandbox (yellow sandbox icon).

Can you reproduce this problem on a new empty sandbox?

I can confirm it also on a new empty sandbox.

What is your Windows edition and version?

Windows 10 Education Version 22H2 OS build 19045.3930 Experience Windows Feature Experience Pack 1000.19053.1000.0

In which Windows account you have this problem?

A local account (Administrator)., A Microsoft account (Administrator)., An account with UAC protection completely turned off.

Please mention any installed security software

Microsoft Defender Antivirus

Did you previously enable some security policy settings outside Sandboxie?

No response

Trace log

No response

Sandboxie.ini configuration

[GlobalSettings]

FileRootPath=C:\Sandboxes\%SANDBOX%
Template=SynapticsTouchPad
Template=Edge_Fix
Template=OfficeLicensing
Template=WindowsLive
Template=WindowsRasMan
ActivationPrompt=n
ForceDisableSeconds=60
NetworkEnableWFP=y
KeyRootPath=\REGISTRY\USER\Sandbox_%USER%_%SANDBOX%
IpcRootPath=\Sandbox\%USER%\%SANDBOX%\Session_%SESSION%

[UserSettings_029800E3]

SbieCtrl_EditConfNotify=n
SbieCtrl_EnableLogonStart=n
SbieCtrl_EnableAutoStart=y
SbieCtrl_AddDesktopIcon=n
SbieCtrl_AddQuickLaunchIcon=n
SbieCtrl_AddContextMenu=n
SbieCtrl_AddSendToMenu=y
SbieCtrl_ActiveView=40021
SbieCtrl_HideWindowNotify=n
SbieCtrl_ShortcutNotify=n
SbieCtrl_ShowWelcome=n
SbieCtrl_NextUpdateCheck=1555555555
SbieCtrl_UpdateCheckNotify=n
SbieCtrl_ExplorerWarn=n
SbieCtrl_ReloadConfNotify=n
SbieCtrl_SaveRecoverTargets=n
SbieCtrl_AutoApplySettings=n
SbieCtrl_WindowCoords=1404,681,516,367
SbieCtrl_ProcessViewColumnWidths=216,62,225
BoxDisplayOrder=DefaultBox,AdminDefaultBox,AdminTestBox,GamesInstall,GamesInstallnRun,GamesRun,GManagers,ProgramLUse
SbieCtrl_ShouldDeleteNotify=n
SbieCtrl_BoxExpandedView=AdminDefaultBox,GManagers,GamesRun,TestBox
SbieCtrl_AutoStartAgent=SandMan.exe -autorun

[ProgramLUse]
Enabled=y
ConfigLevel=10
Template=AutoRecoverIgnore
Template=LingerPrograms
Template=Kaspersky
Template=BlockPorts
Template=FileCopy
Template=SkipHook
Template=OpenBluetooth
RecoverFolder=C:\Program Files (x86)
RecoverFolder=C:\Program Files
RecoverFolder=C:\OtherPrograms
RecoverFolder=%Personal%
RecoverFolder=%Start Menu%
RecoverFolder=%Desktop%
RecoverFolder=C:\Documents and Settings
RecoverFolder=D:
RecoverFolder=F:
BoxNameTitle=y
BorderColor=#00ffff,off,6
BlockDrivers=y
BlockWinHooks=n
BlockFakeInput=y
BlockSysParam=y
BlockPassword=y
OpenPipePath=winace.exe,D:\
OpenPipePath=winace.exe,F:\Downloads\
OpenPipePath=winace.exe,%Personal%
OpenPipePath=FirefoxPortable.exe,D:\
OpenPipePath=FirefoxPortable.exe,F:\Downloads\
OpenPipePath=FirefoxPortable.exe,%Personal%
OpenPipePath=H:
OpenPipePath=G:
OpenPipePath=C:\Temp
LingerProcess=peer.exe
LingerProcess=peeradapater.exe
NeverDelete=y
NeverRemove=y
OpenFilePath=C:\OtherPrograms
@IntrepidWanderer IntrepidWanderer added the Confirmation pending Further confirmation is requested label Feb 8, 2024
@offhub
Copy link
Collaborator

offhub commented Feb 8, 2024

You cannot install applications that you run from the sandbox folder to the location on the host using OpenFilePath. You should use OpenPipePath instead.
See:
Resource Access table
OpenPipePath

To run an application in the sandbox folder, simply use the direct sandbox path. (or Remove the OpenFilePath/OpenPipePath directive for that location)

"C:\Sandboxes\ProgramLUse\drive\C\OtherPrograms\FirefoxPortable\FirefoxPortable.exe"

You can use SandMan.exe or Start.exe to run an application that is located in a folder on the host.

"C:\Program Files\Sandboxie-Plus\SandMan.exe" /box:ProgramLUse "C:\OtherPrograms\FirefoxPortable\FirefoxPortable.exe"

@IntrepidWanderer
Copy link
Author

IntrepidWanderer commented Feb 8, 2024

@offhub You misunderstand what I'm trying to do with OpenFilePath. I'm aware of the differences between OpenPipePath and OpenFilePath. In fact, still using OpenFilePath, if I had ran the installer from outside of the sandbox into the sandbox, it would've installed the program to the host folder of the same name outside of the sandbox, but that is not what I want. As stated in the first step of my description, I expressly moved installer to the same name folder inside the sandbox and installed to the folder inside the sandbox. But I still wanted to allow host folder access to other programs running into the sandbox to be able to write directly to the host folder, IF they were outside the sandbox, which is why I set that folder to OpenFilePath instead of OpenPipePath.

"using OpenFilePath, if I had ran the installer from outside of the sandbox, it would've installed the program to the host folder of the same name outside of the sandbox"

Also, initially, this is exactly what I had done, and the shortcuts worked, but when I moved the program folders from the host folder into the same named folder under the sandbox (still OpenFilePath) and updated the shortcuts to point directly to the new location inside the sandbox, the shortcuts would not work. Which is when I tried the steps outlined in my first post to install directly into the sandboxed folder to see if that made a difference, and the shortcuts auto-generated by Sandboxie for host start menu still did not work.

In any case, all of this is not really the point, as the shortcuts should work regardless with the proper path setup in the shortcut as I have, no?

I've also tried to use the "fake path" to have the program's path point directly to the host folder of the same name instead of the sandboxed folder, and that did not work either. Prior to switching to Sandboxie-Plus, I had been using the classic Sandboxie for many years, up until the new new company that acquired Sandboxie just decided to abandon everything and stop honoring lifetime licenses like mine by ending the registration server and not providing a patch... But anyway I was using a very old version v3.76? I think, and I remember that shortcuts would work either way, no matter if the path pointed to the real path inside the sandbox, or the "fake path" of the host folder with the same name. Admittedly I didn't use OpenFilePath very often, mostly sticking to OpenPipePath, so I can't verify if the same issue with shortcuts existed when using OpenFilePath setting.

@offhub
Copy link
Collaborator

offhub commented Feb 8, 2024

Please try this setting and see if it resolves the issue.

OpenFilePath=!Start.exe,C:\OtherPrograms

@IntrepidWanderer
Copy link
Author

Please try this setting and see if it resolves the issue.

OpenFilePath=!Start.exe,C:\OtherPrograms

Yep, using OpenFilePath=!Start.exe,C:\OtherPrograms to replace my old setting OpenFilePath=C:\OtherPrograms worked.

Is this just excluding all sandboxie process from the OpenFilePath restriction?

@offhub
Copy link
Collaborator

offhub commented Feb 8, 2024

Sandboxie does not perform this type of check. Therefore, all programs named Start.exe will also be affected by this setting.

@IntrepidWanderer
Copy link
Author

@offhub I see. Well, I guess it's a workaround for now then. Thanks for the help!

@offhub offhub added Workaround Temporary or alternative solution and removed Confirmation pending Further confirmation is requested labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Workaround Temporary or alternative solution
Projects
None yet
Development

No branches or pull requests

2 participants