You are here

System variables with colon

9 posts / 0 new
Last post
m-alice
m-alice's picture
Offline
Last seen: 2 years 8 months ago
Joined: 2012-09-23 03:25
System variables with colon

Hello
I just try to use PAL variables. Start Console2 application, type
echo %PAL:Drive%
and see %PAL:Drive% label instead drive letter
This is question: how to use system variables with colon ":" in child processes?
Example: when i type ECHO %userprofile% i see path to my windows user profile.

JLim
Offline
Last seen: 6 months 2 weeks ago
Joined: 2013-07-17 01:30
PAL variables are for PAF launcher only.

This variable is use in writing launcher ini and custom code only. It will not work outside the PAF launcher.

m-alice
m-alice's picture
Offline
Last seen: 2 years 8 months ago
Joined: 2012-09-23 03:25
> PAL variables are for PAF launcher only.

This is not true. You can see this by opening Console2 and there typing command:
ECHO %PortableApps.comDocuments%
My problem only in colon.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 month 2 weeks ago
DeveloperModerator
Joined: 2008-07-24 18:46
May work, not intended

While that may work for PortableApps.com variables, the PAL ones are specifically designed to be used within a single App's launcher, and designed not to be accessed externally.

This is, as I said, by design, so that individual apps are not affected by one another. It will not be changed.

[EDIT] With that said, if you can explain more about what you're trying to achieve, there may be other ways to accomplish your goal.

m-alice
m-alice's picture
Offline
Last seen: 2 years 8 months ago
Joined: 2012-09-23 03:25
for single app, not from other

I just want to access a variable from a child process.
For variable PortableApps.comDocuments it works, from anywhere with a colon - no.
As i wrote above (example),
ECHO %PortableApps.comDocuments% gives a value E:\Documents
echo %PAL:Drive% displays %PAL:Drive%
http://funkyimg.com/i/29fin.png

John T. Haller
John T. Haller's picture
Offline
Last seen: 8 hours 12 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
PAL Variables Internal

The PAL:Drive, PAL:LastDrive, etc variables are internal to PAL itself and are not accessible to the child process. They aren't for the child process. They are for PAL itself. This is by design.

If you want PAL:Drive accessible to your child process, make an entry of PALDriveForChild=%PAL:Drive% in the Environment section of the launcher INI and then use that variable.

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

m-alice
m-alice's picture
Offline
Last seen: 2 years 8 months ago
Joined: 2012-09-23 03:25
> please, i need help only with colons in variables

This applies only to a variable with a colon (%pal:variable%)? Because the variables to point (%PortableApps.comVariable%) I get access without problems.
My question is for the colon, not access to system variables.
For example, if you type the command
SET variable1.variable1=test1
and then
ECHO %variable1.variable1%
the screen displays the message
test1
But if you type
SET variable1:variable1=test1
and then
ECHO %variable1:variable1%
the screen will not test1 but for some reason %variable1:variable1%
Here in the middle of the colon is referred to http://www.computerhope.com/sethlp.htm (Search on line %PATH:str1=str2%), but nothing concrete yet and I have not found.

John T. Haller
John T. Haller's picture
Offline
Last seen: 8 hours 12 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Don't Use Colons

So, just don't use colons.

All the PAL: variables are *purposely* internal to the app launcher only. Don't use them in your base app. Period.

PortableApps.comDocuments et al are purposely external. They're set by the platform for use by app launchers and apps.

If you're having issues with colons otherwise, I'm not sure why. It doesn't really matter. I would suggest just not using them.

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

m-alice
m-alice's picture
Offline
Last seen: 2 years 8 months ago
Joined: 2012-09-23 03:25
Well, I try my luck with the %~dp1

In any case, thank you for your answers
just wanted to, from one application to run other applications (without absolute paths) e.g. Open With plugin for Firefox or similar plugin for AIMP.

Log in or register to post comments