You are here

application launch parameter / switch

8 posts / 0 new
Last post
andreaa
Offline
Last seen: 1 year 10 months ago
Joined: 2013-08-17 06:43
application launch parameter / switch

Topic: platform management of the parameter / switch at application launch
Description: Topic is focused to identify how to configure the portableapps platform manages to pass parameters (or commonly called switches) at application startup.

I've performed several searches in the forum and I haven't found a specific topic related to the parameter at application launch.
I've identified a post which resemble the same problem I'm experiencing and I've added the post "Command Line Parameter Switch".
If there is already an existing a section in the forum or support explaining the topic I kindly ask the moderator or administrator to relate the forum entries as applicable.

I include here my post adapting it to the topic describing the specific problem I'm facing hoping someone could help and I'm sure the parameter at startup is very powerful so it would benefit all forum and users.
The post refer to one app to make specific example however the topic applies to all portable application.
Of course each application uses different parameter/switches and the parameters used need to comply with the specific supported parameter set.

I'd like to start WinSCPportable using the portableapps platform link with specific storage settings based on a different portable volume.
Target: I'd like to pass a parameter to WinSCPportable at launch from the portableapps platform
Rationale: I need to store the information on connections (host, user, keys, ports..) in a different location from the application.

the portableapps platform is supporting the parameters in the INI file so I've followed the steps indicated without success.

Would you kindly help me to achieve the target (pass a parameter to WinSCPportable at launch from the portableapps platform) ?

As additional information:
As workaround: I've created a new shortcut with the desired parameter at command line
Launching the shortcut, WinSCP executes with the parameter correctly parsed and WinSCPPortable visualize the information from the selected storage location.
Unfortunately with this workaround I don't use the portableapps platform which I'd like to continue to use.

Steps followed:
1- copy Other\Source\WinSCPPortable.ini to the installation folder (the same folder as WinSCPPortable.exe)
2- open the WinSCPPortable.ini (copied at point1) in text editor
3- edit the AdditionalParameters line as follow:
AdditionalParameters=/ini="T:\winscp.ini"
4- Save file
5- Restart WinSCPPortable
Unfortunately the parameter is not parsed correctly

Is the syntax adopted in the line "AdditionalParameters" at point 3 correct?

AdditionalParameters=/ini=T:\winscp.ini
AdditionalParameters="/ini=T:\winscp.ini"
AdditionalParameters="/ini=T:/winscp.ini"
AdditionalParameters="/ini=T://winscp.ini"
AdditionalParameters=/ini=T://winscp.ini
AdditionalParameters=/ini=T:\winscp.ini
AdditionalParameters=/ini=T:\\winscp.ini

If I change parameter (i.e. "/help") it works showing correctly the help message so it means the file is parsed but it seems there is problem in understandng the "/ini" syntax used?

I hope to have provided detailed information and please let me know if you require any additional information,
Appreciate your help,
Thanks a lot in advance,
kind regards,
Andrea

Wm ...
Offline
Last seen: 7 years 11 months ago
Joined: 2010-07-17 12:37
maybe I misunderstand

maybe I misunderstand but why don't you just create a shortcut with the required parameters rather than expecting the platform to accommodate what you'd like to do w. a specific app. you think it is generic, I think it is specific

Wm

andreaa
Offline
Last seen: 1 year 10 months ago
Joined: 2013-08-17 06:43
yes as workaround

Thanks for your kind answer and for taking the time to read the long post :)
Yes there are two aspects:
1) generic. The platform supports to pass parameter at launch of all application. (generic because it applies to all applications).
My question is: how and which syntax to use.
2) specific. My specific topic relates to WinsCP.
The "AdditionalParameter" is already supported by the platform and I'm trying to understand what I'm doing wrong.

Your suggestion is exactly the workaround I'm currently using (mentioned in first post) however this workaround implies that I won't use the platform to launch the portableapps application(s).

Since the platform is supporting parameter to be passed at launch of application I'd like to understand:
- how to use this existing feature?
- what I'm doing wrong.or is it a platform/application bug?

Thanks a lot, cheers,

Wm ...
Offline
Last seen: 7 years 11 months ago
Joined: 2010-07-17 12:37
See if I have generalised this right

background: about once a week I (others too, I'm sure) look at the unanswered forum topics, sometimes there is a reasonable thing that people have missed, in your case I think it was a bit long and over-complicated and everyone expected someone else to read and absorb it Smile

I also see you've asked about a portable ssh server, that seems connected to me.

Back to your original point I think the answer is that Portable Apps must work in as many generic situations as possible and that means that stuff you do outside of Data may be overwritten or ignored and so there isn't a lot of point in doing that unless you're going to move it out of the way of the next update, i.e. create a shortut of sorts. Am I making sense??

BTW I'm not the right person to convince about more stuff under the PA platform as I *love* PortableApps but only use the platform for updates.

Anyway, I have a number of portable but not PA apps in my PortableApps directory and sometimes it needs persuasion to find them.

Someone else raised that here recently, in fact.

If you could make a bat or similar that ran your app-next-door and showed on the PA platform menu would you be OK with that?

Wm

andreaa
Offline
Last seen: 1 year 10 months ago
Joined: 2013-08-17 06:43
yes it makes sense thanks

Hi Wm, all,
yes it makes sense. Bat file would equally do the job.
Having created the link/shortcut passing the command line parameter avoid the creation of bat file: they works equally well yes thanks.
However these methods avoid the use of the platform "ini" functionality.

So the main topic and open question is:
- Where can I find the guide or documentation related to the use of the ".ini" file in portableapps platform?
- Which is the syntax to adopt in the ini field "AdditionalParameter"?

Thanks a lot, cheers

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 month 2 weeks ago
DeveloperModerator
Joined: 2008-07-24 18:46
Readme, in use
  • The "guide" that you're looking for can vary but it can be found at Other\Source\Readme.txt
  • The /ini is already in use iin WinSCP Portable, as you can see here, and it is possible that WinSCP does not support that switch being set more than once.
Wm ...
Offline
Last seen: 7 years 11 months ago
Joined: 2010-07-17 12:37
Is the issue ini being over used?

I've read through your link and I'm wondering if I'm understanding correctly so the OP can be helped.

If the OP put his stuff in the right place in the files it would be OK but what he *shouldn't* do is expect more than one iteration of the ini sequence to be observed.

Am I right-ish?

Wm

andreaa
Offline
Last seen: 1 year 10 months ago
Joined: 2013-08-17 06:43
thanks

thanks for your answer, it clarifies the syntax. Thanks!

I summarize here my understanding:
it appears the command line string 'EXECSTRING' is built appending the 'ADDITIONALPARAMETERS' string.
This means the syntax to use is the syntax supported by the end application (e.g. WinSCP).
So the syntax is correct as if I pass it directly (using workaround shortcat or batch or commandline) it works.
Then the problem appears to be as you say, the "INI" parameter/switch not supported more than once.

About the readme.txt: it provide this specific information for WinSCP and it is useful to clarify the topic on this application. Thanks,

In general I am looking for the Guide of the platform explaining how to use the platform features common to all applications. (like passing switch/parameter at startup and others which I'm very intersted to learn about): I've looked in the portal without success.

Any idea where could I find the guide?

Thanks a lot for your time,
cheers,

Log in or register to post comments