You are here

Is it possible to add command line startup switches to 'other' apps in the PA menu?

19 posts / 0 new
Last post
Jason404
Jason404's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2009-03-08 04:13
Is it possible to add command line startup switches to 'other' apps in the PA menu?

I know how to add command line startup switches to PortableApps launchers.

I have added several apps within the PortableApps folder, which are already portable, so they do not have PA launchers.

These programs' icons appear in the PA menu, which is great, but I was wondering if there was any way to add startup switches to these icons, in a similar way you can with Windows shortcuts in the Start Menu.

If not, is there a workaround? Is it possible to make an ultra-simple launcher which opens the executable with command line switches and then closes?

BungieCord
Offline
Last seen: 3 years 5 months ago
Joined: 2009-03-12 16:11
Jason, I do something I think

Jason, I do something I think like what you're talking about with several of my Portable Apps. Like when I click on my TBP icon, it first starts FreePops so TBP can download E-mails from Webmail-only accounts, then it starts TBP.

But I don't know if what I'm doing would apply to your case. Can you give us more details about how you've installed these apps, ans what you did to cause the icons to appear in the menu?

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 7 years 3 months ago
Joined: 2007-04-15 21:08
Completely different

You're trying to make one app launch another. He's trying to add command line arguments to the program which gets started. There is no way to do either in the Platform at present.

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

BungieCord
Offline
Last seen: 3 years 5 months ago
Joined: 2009-03-12 16:11
I add the " -profile" command

I add the " -profile" command line argument to the command starting TBP proper that my batch file runs after it starts FreePops. It otherwise always starts thinking it's a new installation.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 7 years 3 months ago
Joined: 2007-04-15 21:08
EEK!

You mustn't do that. You're messing up Thunderbird Portable - it uses that itself to make it portable. You're completely undermining the purpose of Thunderbird Portable if you're doing that - you may as well just use Thunderbird.

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

BungieCord
Offline
Last seen: 3 years 5 months ago
Joined: 2009-03-12 16:11
I guess I should have

I guess I should have included the rest of the line:

thunderbird.exe -profile %CD%PortableApps\ThunderbirdPortable\Data\profile

%CD% earlier is set to the root directory of the drive letter that the host pc uses for the portable drive.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 7 years 3 months ago
Joined: 2007-04-15 21:08
ThunderbirdPortable.exe

You should never run thunderbird.exe directly. You should run ThunderbirdPortable.exe. Setting the profile path is not the only thing that ThunderbirdPortable.exe does, which you will lose if you run that directly.

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

BungieCord
Offline
Last seen: 3 years 5 months ago
Joined: 2009-03-12 16:11
I didn't take

I didn't take ThunderbirdPortable.exe out of the loop, I just edited ThunderbirdPortable.ini to run my batch file instead of thunderbird.exe.

It's been running like this for a bit more than two years. Whatever's missing I've learned to live without.

Aluísio A. S. G.
Offline
Last seen: 6 years 2 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Ultra-simple launcher

http://www.mediafire.com/file/dpw6976ku7opy60/SimpleLauncher.zip
This is the smallest recompilable package I was able to get; just replace the text between * in the INI files. To use a custom icon, just replace AppIcon.ico.
This is definitively not PAF-compliant, but it will work.

Previously known as kAlug.

Jason404
Jason404's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2009-03-08 04:13
Cannot get this to work

Hey kAlug. Thanks a lot for this - it's just the sort of thing that I am looking for - however, I cannot get it working. This is my first foray with PA launchers, so I don't really know what I am doing.

I tried it out with mIRC, which is portable already, but I thought it would be nice to be able to use a launcher for it, to allow one instance, etc. It also needs a command line switch to run in portable mode (altough it does not appear to do anything different from what I can make out).

This is what I attempted (and failed at):

I renamed SimpleLauncherPortable.exe to mIRCLauncher.exe

.\mIRC\
   |mIRCLauncher.exe
   |-App\
      |Appinfo\
        |AppIcon.ico
        |AppInfo.ini
        |-Launcher\
        |   |mIRCLauncher.ini
        |   |Splash.jpg
        |mIRC\
          |
          |  __All the mIRC files, including mirc.exe__
          |
          |

--".\mIRC\App\AppInfo\AppInfo.ini"
[Details]
Name=mIRC
AppID=mIRCLauncher
[Control]
Start=mIRCLauncher.exe

--".\mIRC\App\AppInfo\Launcher\mIRCLauncher.ini"
[Launch]
ProgramExecutable=mIRC\mirc.exe
CommandLineArguments=-portable [is this correct?  no leading space?]
DirectoryMoveOK=yes
WaitForProgram=false
WaitForOtherInstances=true     [not really sure why I added this]
SingleAppInstance=true         [this would be beneficial for mIRC]

Was adding more entries the wrong thing to do? Can anybody see what is wrong with this?

Thanks.

[Use <pre> for blocks, not <code> - mod Chris]

Aluísio A. S. G.
Offline
Last seen: 6 years 2 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Remove WaitFor*

I was thinking on a run-and-exit launcher; by removing both lines it will wait for mIRC to finish and prevent other portable instances.
You can use as much spaces as you want between the =; it's trimmed by the Launcher.

Previously known as kAlug.

Jason404
Jason404's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2009-03-08 04:13
Still not working

Thanks for your reply. I removed WaitForProgram=false and WaitForOtherInstances=true, but it still not working.

Aluísio A. S. G.
Offline
Last seen: 6 years 2 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
What is not working?

If it's not preventing another portable instance, add SinglePortableAppInstance=true (I just remembered this).

Previously known as kAlug.

Jason404
Jason404's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2009-03-08 04:13
Something still wrong :/

Thanks again, but it still does not work.

[Launch]
ProgramExecutable=mIRC\mirc.exe
CommandLineArguments=-portable
DirectoryMoveOK=yes
SingleAppInstance=true
SinglePortableAppInstance=true

I see the launcher appear in the Task Manager. It stays there for around three to five seconds and exits, without anything else happening.

Aluísio A. S. G.
Offline
Last seen: 6 years 2 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
So let's figure out what's wrong

Create a file named App\AppInfo\Launcher\Debug.nsh:

!define DEBUG_ALL
!define DEBUG_OUTPUT file

Recompile the launcher, run it, and upload the file Data\Debug.log to somewhere.

Previously known as kAlug.

Jason404
Jason404's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2009-03-08 04:13
Recompile?

Hmmn, I'm not sure what you are talking about here, which must be the problem. I have not been compiling anything. The launcher seems to be a binary executable, so.. I'm confused.

Aluísio A. S. G.
Offline
Last seen: 6 years 2 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
I know

I compiled it... replace the launcher with this: http://kalug.users.sourceforge.net/temp/mIRCLauncher.exe

Previously known as kAlug.

Jason404
Jason404's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2009-03-08 04:13
Still not working!!

Hi kAlug, sorry for the late reply, but that day I was getting so frustrated that I had to leave it for a while.

I still cannot get this working. Could you please tell me what the process is for compiling the launcher, and how do you made the file which you compile. I have compiled programs on Linux, but I do not understand what is happening here, as the file that you initially gave me appeared to be a binary file to start off with.

Building very simple launchers like this is something that I want to learn, and later on I want to learn how to make the launcher start different .exe files, depending on whether the OS is 32 or 64--bit.

Thanks for your help.

Aluísio A. S. G.
Offline
Last seen: 6 years 2 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Check these links

Previously known as kAlug.

Log in or register to post comments