You are here

Question - How to get protableapps drive letter

6 posts / 0 new
Last post
IllusionofDemise
Offline
Last seen: 7 years 11 months ago
Joined: 2007-08-08 08:53
Question - How to get protableapps drive letter

In an app im porting i need to set the paths of some files for it to run is there a way to get the drive letter which the portable app is running from using the launcher??

Patrick Patience
Offline
Last seen: 4 years 4 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Well.

If you're gonna use NSIS, the Variable is {GetRoot}, take a look in the NSIS user manual for it.

______________________
Signature...What Signature?

wraithdu
Offline
Last seen: 10 years 10 months ago
Developer
Joined: 2007-06-27 20:22
Other options

In windows batch '%~d0' gives you the root drive from which the BAT file is launched, ie C:

In NSIS (in addition to above), you could also do

StrCpy $DRIVEROOT "$EXEDIR" 2

That will put the first two characters of the path to the launcher into the variable $DRIVEROOT, ie the root drive, for example C:

JarC
Offline
Last seen: 2 weeks 1 hour ago
Joined: 2007-08-27 12:37
Why isn't this set by default by PAM?

Suggestion to the author of PAM (and if you read this, also to the author of the PAM Mods)

Why not be done with the whole problem and have PAM simply set a PADRV variable...just like the U3 launcher.

Simeon
Simeon's picture
Offline
Last seen: 9 years 6 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
maybe

because not everyone uses Portable Apps with the Menu. So John wants to have each App to be self-contained and independent.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

JarC
Offline
Last seen: 2 weeks 1 hour ago
Joined: 2007-08-27 12:37
Good point.

Trying to _get_ this program running from the menu has made me overlook the 'other side'. Thank you for reminding me.

Log in or register to post comments