You are here

Environment Vars for Apps in Platform 15.x.x

4 posts / 0 new
Last post
Drazick
Offline
Last seen: 1 day 6 hours ago
Joined: 2010-09-06 06:36
Environment Vars for Apps in Platform 15.x.x

Hello,

In the release notes page (https://portableapps.com/platform/changelog) for version 15.0.0 it says:

ADDED: Platform setting of Documents, Pictures, etc environment vars for apps

I wonder, is that for any application launched from the Platform Menu or should applications be modified to handle this feature?

Thank You.

John T. Haller
John T. Haller's picture
Online
Last seen: 1 min 24 sec ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Separate from Windows

These are vars for the platform's folders. So PortableApps.comDocuments, etc. They are separate and distinct from the standard Windows ones. Every app launched from the platform can utilize them. PAL automatically does and much of our custom code does as well.

Side Note: Settings the Windows ones would be hit and miss because while some apps will check the Windows vars to get the Documents directory, others will use the API call to get it.

Sometimes, the impossible can become possible, if you're awesome!

Drazick
Offline
Last seen: 1 day 6 hours ago
Joined: 2010-09-06 06:36
System Variable

So there are new system variables set by the Platform Menu.
So I guess they are available only for applications launched using the menu, right?

Regarding your note, I'd expect the API to give same result as the System Variables, no?

John T. Haller
John T. Haller's picture
Online
Last seen: 1 min 24 sec ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Yes. No

Yes, to apps launched by the platform. The platform's process sets the vars and then any process launched by the platform inherits them. This way the vars aren't permanently affected on the OS.

If a process updated the Windows environment vars (say Documents) then child processes would see this updated var, but child processes that call the system API for the Documents directory would see the original location.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments