sandboxie-plus / Sandboxie

Sandboxie Plus & Classic
https://Sandboxie-Plus.com
GNU General Public License v3.0
13.71k stars 1.52k forks source link

better file explorer home linking #4122

Open GyomeiHimejima9906 opened 2 months ago

GyomeiHimejima9906 commented 2 months ago

Is your feature request related to a problem or use case?

this feature is related to use case, to divide personal activity to school activity https://github.com/user-attachments/assets/6ee715a7-3ea3-4845-aa6c-90266c6d9d99 https://github.com/user-attachments/assets/967dafd2-7b93-494b-8eae-05a249e7b8ef

Describe the solution you'd like

when i open file explorer and click on the left (this PC, picture, documents, ecc) in a sanbox that option "separate user folder"

Immagine 2024-07-27 110958

yoo see the sandboxie home not the real home of connected user (like then saving a document in the same sandbox with a sandboxed program), because the user folder are separated or if you open a program you cant acce to sandbox home directory (c\sanbo\user\sandbox\usr\current\selected folder) can add a botton on right click menu that add copy selected folder/s and file/s to a sandbox

Describe alternatives you've considered

probably work this solution: maybi when you start Explorer.exe to virtualize them in C:\sanboxie\USER NAME\SANDBOXE NAME\VOLUME\C\Windows\exsplorer.exe (like the real exsplorer but in the sandbox) rather than runt it as external app

offhub commented 2 months ago

It's different at the host level, there's no difference for programs in the sandbox.

GyomeiHimejima9906 commented 2 months ago

ok, but i cant acce any link, because the link use the host folder, i suggest to automaticalyi create folder: "%username%\documents", "%username%\music", "%username%\videos", "%username%\pictures", "%username%\appdata", "%username%\desktop" when creating a new sandbox with separated user folder to have a working links. and by separating user folder the program continue use the some setting of the connected user and the brawser can acce to the extension and session data of the real brawser

problems: https://github.com/user-attachments/assets/c23e28a1-5695-45ea-be5b-15761c0a559b https://github.com/user-attachments/assets/e03f87d1-5bfc-4462-8f6a-abbf9f2ef78d

offhub commented 2 months ago

I watched the videos, but I didn't fully understand what you wanted. However, it seems there might be an issue with your resource access rules. If you share your configuration, I can provide a more precise answer.

GyomeiHimejima9906 commented 2 months ago

I mean, if I split the sandbox home folders (option "separate user folders") and the real one and then deny access to the real one with the "write-only virtual area only" setting, when I click on links (or when a program tries to access those folders) they should be able to access the sandbox one instead of getting an "access denied" or "nonexistent folder" error, because I denied access to the real user folder and not the virtualized one.

offhub commented 2 months ago

You can use the trigger feature to create missing folders. ***

AutoExec=cmd.exe /c "cd /d "%SystemDrive%\Users\%USERNAME%" && md "Desktop" "Documents" "Downloads" "Favorites" "Links" "Music" "OneDrive" "Pictures" "Saved Games" "Videos""
GyomeiHimejima9906 commented 2 months ago

sorry, but this doens't work image but work a terminal (opened manually in the sandbox with privileges rights) folder created with terminal doesn't reconuzed by exsplorrer image

offhub commented 2 months ago

sorry, but this doens't work

Try this command:

AutoExec=cmd.exe /c "type nul > "%SystemDrive%\Users\sbie.txt" && del /q "%SystemDrive%\Users\sbie.txt" & md "%SystemDrive%\Users" "%SystemDrive%\Users\%USERNAME%" & cd /d "%SystemDrive%\Users\%USERNAME%" && md "Desktop" "Documents" "Downloads" "Favorites" "Links" "Music" "OneDrive" "Pictures" "Saved Games" "Videos""
GyomeiHimejima9906 commented 2 months ago

i suggest toimage

i suggest to use to run this batch script

the script has created 3 folders Appdata, Photos, And desktop, but document, music, ecc are missing image

cd c:\users\%USERNAME%\ mkdir Desktop mkdir Documents mkdir Downloads mkdir Favorites mkdir Links mkdir Music mkdir OneDrive mkdir Pictures mkdir Saved Games mkdir Videos mkdir AppData end writing .ini files and writing all public user corrisponding folder (like this: publick user.zip) image image

and writing "defaoult" user folder and "all user" (all user are used from eny software and games Example: autodesk, hogwort legacy, ABBYYfinereader), note that "satoru gojo folder (c:\users\all users\satoru gojo) in all user IS DEFFERENT from (c:\users\satoru gojo)" "satoru gojo" is the name of my windows user image

to chek the folder i used command Get-ChildItem -Path C:\Test -Name where "C:\Test" is the path to check. you can see https://learn.microsoft.com/it-it/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7.4&viewFallbackFrom=powershell-6

host publick folder: Documents Downloads Music Pictures Videos desktop.ini

sandboxie publick folder: Pictures desktop.ini