Environment variables [SOLVED]

If it's not about a problem in the program
Post Reply
Creave
Posts: 35
Joined: Sun Apr 02, 2017 8:32 am

Environment variables [SOLVED]

Post by Creave » Mon Jul 24, 2017 8:36 am

I want to specify some paths and was wondering why

Code: Select all

%Desktop%
works but

Code: Select all

%Downloads%
shows this error:

Image

Where can I find a full list of the environment variables?

Syrinx
Sandboxie Guru
Sandboxie Guru
Posts: 620
Joined: Fri Nov 13, 2015 4:11 pm

Re: Environment variables

Post by Syrinx » Mon Jul 24, 2017 10:20 am

Goo.gl/p8qFCf

APMichael
Posts: 152
Joined: Sun Sep 07, 2014 5:54 am
Location: Germany

Re: Environment variables

Post by APMichael » Mon Jul 24, 2017 12:39 pm

Sandboxie uses its own Expandable Variables:
https://www.sandboxie.com/index.php?ExpandableVariables
https://www.sandboxie.com/index.php?ShellFolders
(But you can use the Windows Environment Variables also.)

%Downloads% was never defined but %{374DE290-123F-4565-9164-39C4925E467B}% should work.
(Check the registry keys mentioned in the second link for an overview.)

Creave
Posts: 35
Joined: Sun Apr 02, 2017 8:32 am

Re: Environment variables

Post by Creave » Mon Jul 24, 2017 2:46 pm

APMichael wrote:
Mon Jul 24, 2017 12:39 pm
Sandboxie uses its own Expandable Variables:
https://www.sandboxie.com/index.php?ExpandableVariables
https://www.sandboxie.com/index.php?ShellFolders
(But you can use the Windows Environment Variables also.)

%Downloads% was never defined but %{374DE290-123F-4565-9164-39C4925E467B}% should work.
(Check the registry keys mentioned in the second link for an overview.)
Yes, I can see them but is it possible to specify more user friendly names?

Guest10
Posts: 5124
Joined: Sun Apr 27, 2008 5:24 pm
Location: Ohio, USA

Re: Environment variables

Post by Guest10 » Mon Jul 24, 2017 3:47 pm

If you want to specify an OpenFilePath you should open Sandboxie Control's window.
Right-click the sandbox name and then
Sandbox Settings > Resource Access > File Access > Direct Access
If it will apply only to one program (safest choice), click "Add Program" and select that program.
Otherwise, select "Add" and browse to the folder (such as your Downloads folder)
OK your way out.

The setting for the Downloads folder will still show as
%{374DE290-123F-4565-9164-39C4925E467B}%
if you look at the Configure > Edit Configuration window, but otherwise the GUI will show it as "C:\Users\(username)\Downloads" in the Sandbox Settings windows.
Paul
Win 10 Home 64-bit (w/admin rights) - Zone Alarm Pro Firewall, MalwareBytes Premium A/V, Cyberfox, Thunderbird
Sandboxie user since March 2007

Creave
Posts: 35
Joined: Sun Apr 02, 2017 8:32 am

Re: Environment variables

Post by Creave » Tue Jul 25, 2017 3:41 am

Thanks for the information!

APMichael
Posts: 152
Joined: Sun Sep 07, 2014 5:54 am
Location: Germany

Re: Environment variables

Post by APMichael » Tue Jul 25, 2017 5:45 am

Creave wrote:
Mon Jul 24, 2017 2:46 pm
Yes, I can see them but is it possible to specify more user friendly names?
Yes, this should be possible. You can add to Sandboxie.ini, for example:

Code: Select all

[GlobalSettings]
Ovr.Downloads=%{374DE290-123F-4565-9164-39C4925E467B}%
(Check the section "Overriding Variables" from the first link.)

Creave
Posts: 35
Joined: Sun Apr 02, 2017 8:32 am

Re: Environment variables

Post by Creave » Tue Jul 25, 2017 8:27 am

Are variables like %{374DE290-123F-4565-9164-39C4925E467B}% on different systems still valid?

APMichael
Posts: 152
Joined: Sun Sep 07, 2014 5:54 am
Location: Germany

Re: Environment variables

Post by APMichael » Tue Jul 25, 2017 8:33 am

Yes, because Microsoft have defined those IDs and names.

Creave
Posts: 35
Joined: Sun Apr 02, 2017 8:32 am

Re: Environment variables

Post by Creave » Tue Jul 25, 2017 8:48 am

Thank you! I appreciate the help! :)

APMichael
Posts: 152
Joined: Sun Sep 07, 2014 5:54 am
Location: Germany

Re: Environment variables

Post by APMichael » Tue Jul 25, 2017 9:29 am

I'm glad I was able to help. :D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest