You are here

Portable apps path variable?

5 posts / 0 new
Last post
Cirunz
Cirunz's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 2009-05-15 06:44
Portable apps path variable?

Hi, there is an environment variable set by the Portable Apps Platform that point out to the "myflashdrive:\PortableApps" path?

I ask this for some apps have configuration parameters wich point to another app location.

In my case, in Total Commander I can set an external editor, and I usually set Notepad++ for this, specifically my portable usb notepad++ installed on the pendrive.

The problem is: in the path parameter I've to write the full path, example:
G:\PortableApps\Notepad++Portable\Notepad++Portable.exe

But from a Pc to another the pendrive letter change, and I've not much of a control on it, so I'll find very usefull to write something like:
%PORTABLE_APPS_PATH%\Notepad++Portable\Notepad++Portable.exe

This is the very only one feauter I miss from U3 Smile

Cirunz
Cirunz's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 2009-05-15 06:44
Hi again, I've resolved my

Hi again, I've resolved my immediate problem with Total Commander with a specific environment variable contained in the program, in this way:

%COMMANDER_PATH%\..\..\..\Notepad++Portable\Notepad++Portable.exe

(I calculate the path starting from pendrive:\portableapps\totalcommander\app\totalcommander).

Still I think the PortableApps environment variable can be usefull for other apps with path configuration Smile

Two strings enter a cafè.
The first says: "barman give me a cofeee$"43Kkfodffd0'efRf4i938£$(£/"
The second string: "Sorry for my buddy, it's not terminated"

m2
Offline
Last seen: 11 years 11 months ago
Joined: 2006-12-12 12:00
You can also use

You can also use %COMMANDER_DRIVE%

"Those people who think they know everything are a great annoyance to those of us who do." Asimov

johnie1
johnie1's picture
Offline
Last seen: 9 years 5 months ago
Joined: 2008-07-05 13:32
i have found...

i have found that if you use a Truecrypt container (which always mounts to a drive letter you can set) and a cmd file to mount it this problem just goes away. i always mount my TC container to V so all my apps are set to V:\whatever...

example cmd file:

@echo off
IF EXIST v:\StartPortableApps.exe GOTO runProg
TrueCrypt /v nameOfTCcontainer /l v /m rm /a /q
:runProg
exit

Of course you can set "Autorun.inf" on ya flash drive to run the cmd file to mount the TC container, it's all good.

m2
Offline
Last seen: 11 years 11 months ago
Joined: 2006-12-12 12:00
It's good only until you meet

It's good only until you meet a computer which has v: in use.
And it may happen. COMMANDER_DRIVE is a better option and in generic case starting with a script like

set PORTABLE_DRIVE=%~d0
::run prog

and referring to %PORTABLE_DRIVE%.

"Those people who think they know everything are a great annoyance to those of us who do." Asimov

Log in or register to post comments