You are here

Learn Parameter Syntax

8 posts / 0 new
Last post
Gaber
Offline
Last seen: 4 years 6 months ago
Joined: 2017-07-16 15:33
Learn Parameter Syntax

I have seen it's possible "force" an application to use a folder instead another...

How have I to set launcher's parameters for avoid the movement from portable folder to Appdata folder?

I have a folder Data/MyApp that must works like in AppData/Roaming/MyApp.

Thanks.

Where can I find tutorial documentation etc?

Makazzz
Makazzz's picture
Offline
Last seen: 9 months 3 weeks ago
Joined: 2019-04-30 15:58
The manuals

When I want to know something I go in the manuals . You an find it in the Development section too.

Me too I am curious about "forcing" an app to do something.

Portabilizing application... 14 at the moment

Gaber
Offline
Last seen: 4 years 6 months ago
Joined: 2017-07-16 15:33
I have read this section

I have read this section BEFORE write my message!

This is the link:
https://portableapps.com/manuals/PortableApps.comLauncher/ref/launcher.i...

I haven't understood the complete process...

Where can I set the target directory with the portable directory?

Makazzz
Makazzz's picture
Offline
Last seen: 9 months 3 weeks ago
Joined: 2019-04-30 15:58
I know that the command line

I know that the command line work IF the app is implemented with something like Visual Studio Code who have these command line for portability https://code.visualstudio.com/docs/editor/command-line#_advanced-cli-opt....
And there is Bitwarden that use environment for it https://help.bitwarden.com/article/where-is-data-stored-computer/.
Then there is the registry way, where you have to value write and everything. So there is the three ways that I know that do not use DirectoryMove.
Everything has to be in the app for using it in the PortableApps.comFormat...

Portabilizing application... 14 at the moment

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 7 hours 39 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
As Makazzz mentions above it

As Makazzz mentions above it is either by a command line parameter, environment variable or registry entry that the app already uses.

The Launcher doesn't make anything extra happen to make that location portable - it only uses ways that an app already allows.

If the app doesn't have any existing ways to do this then we have to juggle directories around with DirectoriesMove or similar.

Gaber
Offline
Last seen: 4 years 6 months ago
Joined: 2017-07-16 15:33
Thank you for the help.

Thank you for the help.

I'm so confused!

If I don't know if my project allow the use of parameters, the only thing I have to do is try...

There are three ways:
1) command line parameter___________CommandLineArguments=--data-directory=%PAL:DataDir%\settings
2) environment variable____________W:\Apps\AppNamePortable
3) registry entry that the app already uses.

Ex: The folder to bypass is AppData/Google (or AppData MyApp) and must be used Portableapps/Data/Google (or MyApp)
How have I to change the two line for obtain folder subtitution?

1) CommandLineArguments=--AppData/MyApp=%PAL:DataDir%\MyApp_______ is right?
2) W:\%PAL:DataDir%\MyApp _________right?

Could you write an example please?

Makazzz
Makazzz's picture
Offline
Last seen: 9 months 3 weeks ago
Joined: 2019-04-30 15:58
Example with VSCode

If you use VSCode for portability this is how you have to put it in the VSCodePortable.ini (or AppNamePortable.ini) (This is only working for VSCode!!!);

[Launch]
CommandLineArguments='--user-data-dir="%PAL:DataDir%\code" --extensions-dir="%PAL:DataDir%\code\extensions"'

And with AppName

[Launch]
CommandLineArguments='--some-command-line="%PAL:DataDir%\FolderForData" --some-other-command-line="%PAL:DataDir%\FolderForData\ASubFolder"'

The things is that not every app have command line argument for this type of work that maybe why its not working for you.

Portabilizing application... 14 at the moment

Gaber
Offline
Last seen: 4 years 6 months ago
Joined: 2017-07-16 15:33
I've tryied the code 1) but

I've tryied the code 1) but PA does't create a folder named MyApp in Data.

What's wrong?

Log in or register to post comments