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

Sandboxie-Plus not saving settings #4396

Open
sl2365 opened this issue Nov 25, 2024 · 13 comments
Open

Sandboxie-Plus not saving settings #4396

sl2365 opened this issue Nov 25, 2024 · 13 comments
Labels
Confirmation Pending Further confirmation is requested

Comments

@sl2365
Copy link

sl2365 commented Nov 25, 2024

Describe what you noticed and did

My issue is that I am running Sandboxie-Plus from a NON-write-protected environment. I am a new user and have little knowledge on how this app works. But only require it for basic usage anyway. But having to set up on every launch is a bit of a put off.

Here's what I do:

  1. Installed portable Sandboxie v1.14.10 on D drive. Win 11 23H2 x64. i7 11700, 24GB RAM.
  2. Run Sandman.exe
  3. Popup asks permission to create services. I check "do not show again" and click "Yes".
  4. Popup asking where to store sandbox. I check "do not show again" and click "No". I've set sandbox to root of D drive.
  5. Setup wizard shows. If I click "Next" and go through whole set up process, I still get the wizard every time. If I click "Cancel" and affirm not to show the wizard again, it still shows.
  6. Move column "Path/Command Line" left next to "Name" column.
  7. Click settings and select "Shell Integration/System Tray" then "On main window close" I select "Close" and tick the two boxes for "Minimise to tray" and "Single click open", then click "Apply" and "OK" to close window.
  8. Click the Sandboxie main window close button, after setting the above, popup appears. Tick the box to not show again and then click "Yes" to confirm cleanup. This closes Sandboxie completely, ending the task in Windows Task Manager.

After saving the settings following the above procedure, nothing is saved and I literally have to go through the exact same steps on every start up. I have also tried other settings, these are also not saved. In fact, on first run, I went through and changed many basic settings and nothing got saved at all. The Log states that the INI has been reloaded, but without saving the settings to it.

Is it a bug or a set up issue that I can fix?
Is, there a way to manually edit the config? Would that save the settings, or would they be reset on start up?
I couldn't find any info on what needs to be added to the config to manually edit it.

Excellent program! Just would like to resolve this issue.

How often did you encounter it so far?

Every start up of Sandboxie-Plus

Expected behavior

I would expect settings to be saved and not have to repeat everything on start up.

Affected program

Irrelevant

Download link

Irrelevant

Where is the program located?

Not relevant to my request.

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?

1.14.10

Is it a new installation of Sandboxie?

I recently did a new clean installation.

Is it a regression from previous versions?

This is the first time I've used Sandboxie-Plus

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 11 x64 23H2, i7 11700, 24GB RAM

In which Windows account you have this problem?

A Microsoft account (Administrator).

Please mention any installed security software

MS Defender

Did you previously enable some security policy settings outside Sandboxie?

No.

Trace log

No response

Sandboxie.ini configuration

# Sandboxie.ini after performing all the above steps:

#
# Sandboxie configuration file
#

[GlobalSettings]
FileRootPath=D:\Sandbox\%SANDBOX%
Template=Edge_Fix
Template=OfficeLicensing
Template=WindowsLive
Template=WindowsRasMan

[UserSettings_0CF2022E]
SbieCtrl_AutoStartAgent=SandMan.exe -autorun
SbieCtrl_EnableAutoStart=y
BoxGrouping=:DefaultBox

[DefaultBox]
Enabled=y
BlockNetworkFiles=y
RecoverFolder=%{374DE290-123F-4565-9164-39C4925E467B}%
RecoverFolder=%Personal%
RecoverFolder=%Desktop%
RecoverFolder=D:\Documents\- TEST -
BorderColor=#00ffff,on,5
Template=OpenBluetooth
Template=SkipHook
Template=FileCopy
Template=qWave
Template=BlockPorts
Template=LingerPrograms
Template=AutoRecoverIgnore
ConfigLevel=10





# Sandboxie-Plus.ini after performing all the above steps:
[Options]
UiLanguage=en
@sl2365 sl2365 added the Confirmation Pending Further confirmation is requested label Nov 25, 2024
@offhub
Copy link
Collaborator

offhub commented Nov 26, 2024

Make sure that the Sandboxie-Plus.ini file is in the portable folder and is writable by SandMan.exe. Also paste the Sbie Messages log to here. (Sbie Messages > Right Click > Copy Panel)

Is, there a way to manually edit the config?

Options > Edit Sandboxie-Plus.ini

This is what i got after following your steps:

[Updater]
PendingUpdate=

[Options]
UseMonitorMode=true
NextCheckForUpdates=1733211766
PortableStart=1
PortableRootDir=0
ViewMode=1
CheckForUpdates=1
OnNewUpdate=install
CheckForIssues=1
CheckForAddons=1
ReleaseChannel=stable
WizardLevel=3
TraceAutoScroll=false
UiLanguage=
DPIScaling=1
UseDarkTheme=2
UseFusionTheme=2
AltRowColors=false
UseBackground=2
LargeIcons=2
NoIcons=2
OptionTree=2
NewConfigLayout=2
ColorBoxIcons=false
UseOverlayIcons=true
HideSbieProcesses=false
FontScaling=100
CoverWindows=false
Editor=notepad.exe
RunInDefaultBox=false
CheckSilentMode=true
ShowMigrationProgress=true
ShowNotifications=true
OpenUrlsSandboxed=2
TerminateWhenExit=false
ShowRecovery=false
InstantRecovery=true
RecoveryOnTop=true
UseAsyncBoxOps=false
EnablePanicKey=false
PanicKeySequence=Shift+Pause
EnableTopMostKey=false
TopMostKeySequence=Alt+Pause
EnablePauseForceKey=false
PauseForceKeySequence=Ctrl+Alt+F
EnableSuspendKey=false
SuspendKeySequence=Alt+Shift+Pause
CleanUpOnStart=false
WatchBoxSize=false
WatchIni=true
ScanStartMenu=true
IntegrateStartMenu=0
IntegrateDesktop=0
SysTrayIcon=1
SysTrayFilter=0
CompactTray=false
AutoBoxOpsNotify=false
OnClose=Close
MinimizeToTray=true
TraySingleClick=true
AutoRunSoftCompat=true
NoSupportCheck=false
UpdateInterval=604800
OnNewRelease=download
PortableStop=1

[UIConfig]
DisabledRecovery=false
DisableMessages=false

[MainWindow]

@sl2365
Copy link
Author

sl2365 commented Nov 26, 2024

Sorry I forgot to say that the Sandboxie.ini file is indeed within the Sandboxie folder. Nothing is write-protected in anyway that I am aware of. The Sandboxie folder has Read Only ticked, but so does every folder I check, only this app is having issues writing to it's config file.

I don't know much about permissions, but then I've literally installed the app as it was meant to be installed.

This is the "Sbie Messages" tab output:

|Time|                    |Message|                                                                            
26.11.2024 09:48:18.100   Maintenance operation completed                                                      
26.11.2024 09:48:19.148   Application Directory: D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus          
26.11.2024 09:48:19.148   Sandboxie-Plus Version: 1.14.10 (5.69.10)                                            
26.11.2024 09:48:19.148   Current Config: D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus\Sandboxie.ini   
26.11.2024 09:48:19.148   Data Directory: D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus                 
26.11.2024 09:48:43.594   Sandboxie config has been reloaded (2)    

No settings are saved at all after following steps from first post. The "Trace Log" is empty, hence why I didn't add anything in the first post.

I know how to open the INI for editing, what I meant when I asked how to edit it manually was, what are the required key=value terms? Is there a list of them all so I can manually add it at least? Though I will still run into issues due to this write problem, so would really prefer to resolve it.

Thanks for your help ;)

EDIT:
Tried a fresh install to new location on D drive, same thing happens. Before running SandMan.exe, the Sandboxie.ini file is empty. After performing the steps in OP, I get the standard settings added to the INI file, as stated in the OP, so it's can't be write-protected in anyway. So why isn't it saving my own settings? Wierd!

@offhub
Copy link
Collaborator

offhub commented Nov 26, 2024

I know how to open the INI for editing, what I meant when I asked how to edit it manually was, what are the required key=value terms? Is there a list of them all so I can manually add it at least?

Unfortunately, there isn't a predefined list available. You'll need to refer to the source code for the required key-value pairs.

Did you try running SandMand as an administrator? Also do not use a disk other than a local disk, such as network drives or disks created by a third-party encryption application.

@sl2365
Copy link
Author

sl2365 commented Nov 26, 2024

Ok thanks, I'll take a look.
It is a local disk. It's a 2TB Samsung 990 M.2 Nvme installed via a Sabrent PCIE adapter. I have had no issues with it regarding other apps.

Just tested Run as admin, still same, nothing saved to INI.
Do you have any other ideas as to why this could be happening?

@offhub
Copy link
Collaborator

offhub commented Nov 26, 2024

  1. If the files exist at C:\Windows\Sandboxie.ini and %LocalAppData%\Sandboxie-Plus\Sandboxie-Plus.ini, rename them.
  2. Remove the read-only flag from the files.
  3. Check permissions again and remove any non-inheritable permissions from portable folder of sandboxie.
  4. Ensure that the Sandboxie-Plus.ini file can be edited manually (e.g., change Language=en line to Language=).

To investigate why the Sandboxie-Plus.ini file is not editable using Process Monitor, you can follow these steps:

  1. Download and Run Process Monitor:

    • If you haven't already, download and launch Process Monitor (ProcMon) from the Microsoft Sysinternals website.
    • https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
  2. Set up Filters:

    • Once Process Monitor is running, you’ll want to set up filters to narrow down the results.
    • Click on Filter in the toolbar and select Filter... (or press Ctrl + L).
    • In the filter dialog, you can filter by the Path that includes Sandboxie-Plus.ini or any related file in the Sandboxie folder. Set the filter as follows:
      • Path | contains | Sandboxie-Plus.ini
  3. Reproduce the Issue:

    • Launch SandMan and configure it according to your needs.
    • This will capture the file system activity related to this operation.
  4. Look for Denied Access or Errors:

    • After you attempt to edit the file, look for entries in Process Monitor where the Access Denied or NAME NOT FOUND result is shown.
    • Pay special attention to any entries where the Operation column shows CreateFile, WriteFile, or similar file manipulation operations.
    • If you see access denied errors, the problem might be related to file permissions or the file being locked by another process.

By following these steps and analyzing the results in Process Monitor, you should be able to identify why the Sandboxie-Plus.ini file is not editable. It's likely due to permission issues, file locks, or Sandboxie's own process interference.

@sl2365
Copy link
Author

sl2365 commented Nov 26, 2024

This is really weird!!! I just came back to look at your comment. Opened C:\Windows\ to see if the SB INI file was there, it wasn't, so I opened SB+ and god knows how but the last opening had saved all pref's and now the Sandboxie-Plus.ini is populated with all the settings!!

I think I know what's wrong but no idea how to fix it.

When I installed SB+ originally, I installed it to D:\Documents- TEST -\Sandboxie-Plus\ I always use this folder for downloads and testing. I'll name this "v1". So once I checked everything, I moved the folder to it's current location which may be the cause of the issue? A strange thing to happen, yes, and the reason I think this is the cause is that when I reinstalled SB+, which I'll name "v2", to D:\Documents- TEST -\Sandboxie-Plus\ I tried "v1" originally installed and moved, which is saving settings. But if I delete the "v2" installation, "v1" stops saving it's settings! Wtf?

I recovered "v2" from the recycle bin, tried again, but it refuses to save again! No idea what's happening.

I'll try your suggestions now. Though I don't know what no. 3 is?

  1. Check permissions again and remove any non-inheritable permissions from portable folder of sandboxie.

Thanks again...

@offhub
Copy link
Collaborator

offhub commented Nov 26, 2024

Rename or delete the following keys or files, then restart the system. Afterward, try setting up from scratch using a new portable folder. Do not run anything from the old folders. Additionally, avoid running multiple instances of SandMan simultaneously.

Delete key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SbieDrv
Delete key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SbieSvc
Delete value: SandboxiePlus_AutoRun under HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Rename file: C:\Windows\Sandboxie.ini
Rename file: %LocalAppData%\Sandboxie-Plus\Sandboxie-Plus.ini
Rename key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sandboxie-Plus_is1

@sl2365
Copy link
Author

sl2365 commented Nov 26, 2024

  1. Sandboxie.ini and Sandboxie-Plus.ini do not exist in either C:\Windows or AppData folders.
  2. Those two existing files are located in the portable install folder and do not have Read Only ticked.
  3. Don't know what permissions I should have or how to remove non-inheritable permissions. What are they? Though I checked permissions from a folder I created a while ago and all permissions are identical. Though there is an additional entry in the "Group or User names" box with my name and MS email address, this doesn't appear in the Sandboxie folder permissions. Should it?
  4. Sandboxie-Plus.ini file is editable manually.

Installed Process Monitor and followed your steps as closely as possible:

  1. Download and run PM.
  2. Filter added and executed ok, afaik.
  3. SandMan launched, opened Options dialogue box, ticked random option, in this case the "Count and display disk space...", clicked Apply and OK then closed SB+.
  4. There are over 71 million events and rising causing Process Monitor to crash! Does that help at all? I saw nothing regarding "Access Denied" or "NAME NOT FOUND" but trying to scroll through was very laggy and kept stalling before it crashed.
    Attempted a second time after only capturing when starting and stopping Sandboxie. This time there are around 5 entries stating "Access Denied"
    SandMan.exe SetRenameInformationFile D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus\Sandboxie-Plus.ini.aYeliM
    SandMan.exe SetRenameInformationFile D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus\Sandboxie-Plus.ini.vCvTk
    etc...

I then R-clicked an entry and selected "Count occurrences" which opened a window with seven entries.
Here's the content of the saved CSV file:

"Value","Count"
"D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus\Sandboxie-Plus.ini","170"
"D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus\Sandboxie-Plus.ini.aYeliM","29"
"D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus\Sandboxie-Plus.ini.lock","80"
"D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus\Sandboxie-Plus.ini.MJkzaZ","29"
"D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus\Sandboxie-Plus.ini.OBnoaT","29"
"D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus\Sandboxie-Plus.ini.txTNVR","29"
"D:\SyMenu - Other\ProgramFiles\MyApps\Sandboxie-Plus\Sandboxie-Plus.ini.vCvTkO","29"
Does all this mean anything?

@sl2365
Copy link
Author

sl2365 commented Nov 26, 2024

Ok sorry, will do that now. But I do NOT have those INI files in that location as it is a portable install, meaning they are located within the Sandboxie-Plus portable folder on a local drive..

  1. Delete key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SbieDrv

  2. Delete key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SbieSvc

  3. Delete value: SandboxiePlus_AutoRun under HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

  4. Rename file: C:\Windows\Sandboxie.ini

  5. Rename file: %LocalAppData%\Sandboxie-Plus\Sandboxie-Plus.ini

  6. Rename key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sandboxie-Plus_is1

Number 1 , 2 , 3 and 6 do not exist on my system registry. Likely due to having installed the portable version?
Number 4 and 5 do not exist in that location. Only within the portable install folder.

Also, I have only ever run a single instance.

@sl2365
Copy link
Author

sl2365 commented Nov 26, 2024

Edited Sanboxie-Plus.ini file by adding in the path to my text editor in the "Editor=" key, which was saved and appears in the options window correctly.

Reinstalled as suggested, the new version does not save it's settings either.
Reinstalled again to drive root, still doesn't save settings.

Think I may have found the issue, not sure? But I reopened the original SB+ ie, what I called "v1", and then clicked the Notepad icon, Edit Sandboxie.ini, to open the settings file which gave me an error window saying it couldn't find the file as the path is wrong. It is correct in the Sandboxie-Plus.ini file, but the path shown in the error window is:

D:yMenurogramFilesPSSuiteyMenuSuiteudaText_(x64)_spsudatext.exe

Whereas it should be:

D:\SyMenu\ProgramFiles\SPSSuite\SyMenuSuite\CudaText_(x64)_sps\cudatext.exe

Unless this is incorrect in the settings file? It's basically removing the \ and first letter of each folder and the filename.
I escaped the \ by doubling up so the path is now:

Editor=D:\SyMenu\ProgramFiles\SPSSuite\SyMenuSuite\CudaText_(x64)_sps\cudatext.exe

Due to this I've tried this with the Sandboxie.ini too:

[GlobalSettings]
FileRootPath=D:\Sandbox\%SANDBOX%

[MyBox]
RecoverFolder=D:\Documents\- TEST -

Is it required here or not?

@offhub
Copy link
Collaborator

offhub commented Nov 26, 2024

If you see "Access Denied," there may be an issue with permissions or another application might be causing a conflict.

sbie4396spini01.mp4

@sl2365
Copy link
Author

sl2365 commented Nov 26, 2024

Well, I performed a restart and only one app is set to start with Windows, SyMenu. That auto starts two other apps, XYplorer and Rainmeter. I closed them and then opened Process Monitor. Then run SandMan.exe, still the same.

What is this file:
...\Sandboxie-Plus\Sandboxie-Plus.ini.lock

Process Monitor says Sandboxie is creating this file, but it doesn't exist. I have Hidden files shown at all times. Should it appear after starting SB+?

@sl2365
Copy link
Author

sl2365 commented Dec 28, 2024

Updated to Sandboxie-Plus v1.15.4
No change, still unable to edit settings.
Any idea what that file above is? Is that normal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmation Pending Further confirmation is requested
Projects
None yet
Development

No branches or pull requests

2 participants