You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I set some custom Windows system environment variables in a sandbox.
Run the program placed in the sandbox folder (%sandboxie%\%user%\box\drive\D\vscode\Code.exe) in two different ways, the Windows system environment variables are not the same.
[Expected] Run with command: "...\Sandboxie-Plus\Start.exe" /box:box "%sandboxie%\%user%\box\drive\D\vscode\Code.exe".
[Unexpected] Run the program directly through the Explorer. This will not apply the above variables.
To Reproduce
Steps to reproduce the behavior:
Create a new sandbox named box.
Set up custom env vars:
a. Run control through the sandbox right-click menu: Run -> Run Program
b. Choose System -> Advanced system settings
c. On the Advanced tab, click Environment Variables
d. Click New to create a new environment variable with:
- name: test
- value: echo test...
Set up VS Code
a. Download VSCode
b. Unzip it to the sandbox folder: [YOUR sandboxie PATH]\box\drive\D\vscode\
Run VS Code with command:
a. [Win + R] to display dialog.
b. Enter: "C:\Program Files\Sandboxie-Plus\Start.exe" /box:box "[YOUR sandboxie PATH]\box\drive\D\vscode\Code.exe"
c. [Ctrl+`] to display VS Code terminal.
d. Click the v sign in the upper right corner of the terminal to show the dropdown list
e. Click Commond Prompt on the dropdown list to launch cmd console
f. Enter command: %test%
C:\Users\User>%test%
test...
C:\Users\User>
Run VS Code with Explorer directly:
a. [Win + E] to start Explorer.
b. Go to the sandbox folder: [YOUR sandboxie PATH]\box\drive\D\vscode\
c. Double click the Code.exe to start VS Code IDE in the box sandbox.
d. Repeat the above steps 4-c to 4-e.
e. Enter command: %test%
C:\Users\User>%test%
'%test%' is not recognized as an internal or external command, operable program or batch file.
C:\Users\User>
Note: Steps 4 and 5 are running the code.exe in the same sandboxie environment, but the applied system environment variables are not the same!
Expected behavior
Consistent system environment variables.
System details and installed software (please provide the following information):
Windows 10 Pro 21H1.
Sandboxie Plus 0.9.6.
Latest VS Code.
Comodo Personal Firewall 12.2.2.8012
The text was updated successfully, but these errors were encountered:
this is kind of expected, the changes you do in the sandbox do not propagate to the real system, but when setting up the environment the real system values are used.
To make this work a new functionality would need to be added to check the sandboxed registry for added variables and add them.
To make this work a new functionality would need to be added to check the sandboxed registry for added variables and add them.
This seems to be a good functionality to solve the out-of-sync environment variables between the system and the sandbox, when one of them changes the env setting. And it may need to consider the problem of overwriting.
In addition, the main issue I posted is that different environment variables are imported in the same sandbox.
As far as I know, if the program is placed in the sandbox folder, there are two ways to start the program in the sandbox:
Run the program by the command in cmd: [Sandboxie-Plus path]\Start.exe \box:xxx [program]
Double-click to run the program in the Explorer
** Please note that the sandbox has its own environment variable settings (I have changed it), so it is different from the system environment variables.**
Both of the above methods start the program in the sandbox (managed by the sandbox) as expected. However, the former imported the environment variables of the sandbox as expected, while the latter imported the environment variables of the system, which was unexpected.
Describe the bug
When I set some custom Windows system environment variables in a sandbox.
Run the program placed in the sandbox folder (%sandboxie%\%user%\box\drive\D\vscode\Code.exe) in two different ways, the Windows system environment variables are not the same.
To Reproduce
Steps to reproduce the behavior:
a. Run control through the sandbox right-click menu: Run -> Run Program
b. Choose System -> Advanced system settings
c. On the Advanced tab, click Environment Variables
d. Click New to create a new environment variable with:
- name: test
- value: echo test...
a. Download VSCode
b. Unzip it to the sandbox folder: [YOUR sandboxie PATH]\box\drive\D\vscode\
a. [Win + R] to display dialog.
b. Enter: "C:\Program Files\Sandboxie-Plus\Start.exe" /box:box "[YOUR sandboxie PATH]\box\drive\D\vscode\Code.exe"
c. [Ctrl+`] to display VS Code terminal.
d. Click the v sign in the upper right corner of the terminal to show the dropdown list
e. Click Commond Prompt on the dropdown list to launch cmd console
f. Enter command: %test%
a. [Win + E] to start Explorer.
b. Go to the sandbox folder: [YOUR sandboxie PATH]\box\drive\D\vscode\
c. Double click the Code.exe to start VS Code IDE in the box sandbox.
d. Repeat the above steps 4-c to 4-e.
e. Enter command: %test%
Note: Steps 4 and 5 are running the code.exe in the same sandboxie environment, but the applied system environment variables are not the same!
Expected behavior
Consistent system environment variables.
System details and installed software (please provide the following information):
The text was updated successfully, but these errors were encountered: