I would like to know if it is possible to use command line arguments for the launcher (for example FirefoxPortable.exe) of my portable apps. I would like to know this, because I want it the .ini file (for example FirefoxPortable.ini).
I know I could achieve this by just deleting the file. However, I sometimes do need the file, so I was thinking of creating two shortcuts. One that launches the launcher without command line arguments, and one that launches the launcher with command line arguments.
If anyone needs more information to help me, feel free to ask.
The launcher is programmed to pass on parameters to it's program.
So any parameters you give to FirefoxPortable.exe will go to firefox.exe
How do you add parameters to exe's?
Thanks
I would write a BAT script that would call on the portable EXE launcher.
For example, FirefoxPortable(ProfileManager).bat:
@ECHO OFF
START FirefoxPortable.exe -ProfileManager
EXIT
-----
EDIT
There doesn't seem to be a profile manager in portable Firefox, however, if you replace -ProfileManager with a website address, it then opens the website in FFP.
Limits are for people with no imagination.
Sorry for being a little dim here, but I do not fully understand...
If I create a .bat file, how do I get that in the PortableApps menu?
As I understand, rightly or wrongly, the exe in the programs folder calls the exe located in the programs app folder, for example:
...\PortableApps\FirefoxPortable\FirefoxPortable.exe
calls
...PortableApps\FirefoxPortable\App\Firefox\firefox.exe (how firefoxportable.exe knows where to find firefox.exe I do not know!!)
If this is the case do I delete firefoxportable.exe and replace it with a .bat calling firefox.exe?
Thanks for your help.
What specifically do you need on the commandline? We may have a better solution?
Sometimes, the impossible can become possible, if you're awesome!
I used the firefox program as an example but I am really concerned with keepass (command line options I am guessing could be used with a variety of programs!!)
What I want to do is pass the key file in the command line as described in the keepass help center:
KeePass.exe "C:\My Documents\MyDatabaseWithFile.kdb" -keyfile:F:\pwsafe.key
In that case, you can use the local version of KeePass or a Windows shortcut without issue (since it's local), there's no need for the portable version. Using a key file is useless with the portable version (since the key file and DB would both be with you, defeating the purpose).
Most of the situations where a commandline is handy don't really fit in as well with a portable scenario.
Sometimes, the impossible can become possible, if you're awesome!
I sort of see where you are coming from...
The reason I ask is because when you open keepass you have to browse and choose the keyfile - you invariably have to hunt the keyfile down through the directories even if the files are on a USB key or local to the hard drive.
If it were possible to have the keyfile already listed then it doesn't matter whether you are using a local exe with a local keyfile or a USB exe with a USB keyfile.
Using a local version is OK so long as you don't want to take it with you...
Hopefully I haven't misunderstood.
Thanks for your help.
Using a keyfile with your portable database is pointless since they'd be on the same drive... which entirely defeats the purpose which is to lock your database on a local PC and only have it be able to open when you have your drive (usually a USB flash drive) with the keyfile on it plugged in to the PC.
So, just turn the keyfile off for your portable database within KeePass portable since it isn't doing anything security-wise. When off, KeePass Portable can be set to automatically open your last used DB in options. So KeePass Portable launches, prompts for your password and you're looking at your DB. (Note that this doesn't normally work in KeePass portably as the drive letter changes... but our launcher takes care of it for you)
Sometimes, the impossible can become possible, if you're awesome!
I know, it's an old thread, but it would be sad if this was the last word on this matter for people looking for that information.
In my something\PortableApps\KeePassProPortable\App\AppInfo\Launcher\KeePassProPortable.ini I have following:
CommandLineArguments='C:\Path\to\Passwords.kdbx -keyfile:C:\Path\to\keyfile.key'
I put it in as the last line in the
[Launch]
section.It has, alas, to be added again after every update.
The command line arguments are the native part of the [link removed] applications manager. Much more simple.
[Self promotion of closed source alternative menus is not permitted - mod JTH]
John,
It looks like you are too jealous. You remove links and names with diligence, wich worth better application (e.g. programming)
You do not want users to know a better than yours "open" solution. You mislead users and readers.
I am just curious - what's a profit to a man that gained millions of readers and lost a talent of a programmer?
It is a perfectly reasonable rule to have. Suggestions of things which are open source are allowed, but closed source is just against the way things are here. It's an open platform.
Also please don't use such strong language against John - especially when it's unwarranted. It is not jealousy. In some cases it can even amount to as much as anarchy...
(Also don't let's start a flame war here...)
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
Maybe I am obtuse, but all I have seen is "answers" that imply his examples for WHY he wants to pass parameters to a program are pointless or better done some other way. I see no "yes or no" answer to a "yes or no" question.
So, the question still stands:
CAN you pass command line parameters?
Reply redacted.
The first answer is your desired "yes". Everything that follows just fits to the specific scenario and is a perfectly reasonable way to find the solution for the problem, that the thread opener did not explain enough.
So: Yes, if the launcher is PAL, a command line switch is passed through to the app, that the launcher calls (exactly what gluxon said 3 years ago...).
Keepass uses an old custom launcher, but a look at the source reveals, that command line parameters are passed as well - not that it would do any good in the specific case.