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

Create a sandbox by command line doesn't work. #278

Closed
alamaxjashek opened this issue Dec 24, 2020 · 2 comments
Closed

Create a sandbox by command line doesn't work. #278

alamaxjashek opened this issue Dec 24, 2020 · 2 comments
Labels
More Info Needed More information is needed to move forward Workaround Temporary or alternative solution

Comments

@alamaxjashek
Copy link

When I try to created a sandbox by CMD doesn't work.

@DavidXanatos
Copy link
Member

How do you try it?
what command line do you use?

@DavidXanatos DavidXanatos added the More Info Needed More information is needed to move forward label Dec 25, 2020
@isaak654
Copy link
Collaborator

isaak654 commented Jun 7, 2021

Personally I can run the following cmd code without issues inside the Sandboxie Classic folder.
I didn't use the following cmd on Plus, but you can change the sbiepath line if you want to try.
Note: If you use a Sandboxie version before v0.7.5 / 5.49.8, you might need to replace the ConfigLevel value from 9 to 8.

create_new_sandbox.cmd

@echo off

Rem Don't have any programs running sandboxed when you run this.
Rem Don't run this file as administrator or it won't work.

Rem Note that the next line uses the Windows 'set' command to
Rem create an environmental variable - so that the lines below will
Rem be shorter.

set sbiepath="C:\Program Files\Sandboxie\SbieIni.exe"

Rem Check to see if this .cmd script is in the same folder as 'SbieIni.exe'
if not exist %sbiepath% (goto error)

Rem Note that the following lines use the 'set' command in SbieIni.exe.
Rem I think that these 2 Sandbox Settings are required for all sandboxes.
Rem You could pass the name of the Sandbox to create by using a command line parameter,
Rem instead of naming it here below.

Rem This will create the Test sandbox and add these settings:

sbieini set Test Enabled y
sbieini set Test ConfigLevel 9

Rem No other settings are automatically added as sandbox settings.
Rem You must add them all yourself, by adding additional lines such as...

sbieini set Test AutoRecover n
sbieini set Test BlockNetworkFiles y
sbieini set Test BorderColor #00FFFF,ttl,6
sbieini set Test BoxNameTitle y
sbieini set Test DropAdminRights y

Rem The new sandbox will be useable, but it won't show in Sandboxie
Rem  Control's window until you do a Configure > Reload Configuration.

Rem 'set' is a bit dangerous to use if you use SbieIni.exe to modify
Rem an exiting sandox's settings. The 'append' command is also
Rem available as described in the list of SbieIni.exe commands.

echo Use Control's Configure ^> Reload Configuration to see
echo the Test sandbox in Control's window.

goto end

:error
echo:
echo This script must be run from Sandboxie's Program Files folder.
echo Typically, that's "C:\Program Files\Sandboxie"
echo The folder should already contain: "SbieIni.exe"
echo:
pause

:end

exit

@isaak654 isaak654 changed the title Create a SanbBox by command lines doesn't work. Create a sandbox by command line doesn't work. Jun 8, 2021
@isaak654 isaak654 added the Workaround Temporary or alternative solution label Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
More Info Needed More information is needed to move forward Workaround Temporary or alternative solution
Projects
None yet
Development

No branches or pull requests

3 participants