Launch exe with arguments from Catalog?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
JustinF
Posts: 358
Joined: 28 Jun 2005 23:47
Location: Omaha, Nebraska, USA

Launch exe with arguments from Catalog?

Post by JustinF »

I looked through the wiki and did a little searching on the forum but didn't find anything....

Is it possible to launch an executable from the Catalog, supplying parameters/arguments to it? For example, I want to run putty and automagically load one of my saved sessions. In the Catalog destination I type C:\Path\To\putty.exe -load "mySavedSession". But it does nothing. Is there any way to do this currently?
Justin
Windows 7 Professional

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

No, it's not supported ATM. Although I agree it would be a nice idea, and could even work with variables that would be used on parameters for currently selected items on List, etc

But I believe this will be available when "scriptability" will be implemented.
Proud XYplorer Fanatic

admin
Site Admin
Posts: 65185
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Launch exe with arguments from Catalog?

Post by admin »

JustinF wrote:I looked through the wiki and did a little searching on the forum but didn't find anything....

Is it possible to launch an executable from the Catalog, supplying parameters/arguments to it? For example, I want to run putty and automagically load one of my saved sessions. In the Catalog destination I type C:\Path\To\putty.exe -load "mySavedSession". But it does nothing. Is there any way to do this currently?
Create a shortcut (LNK) featuring that parameters and launch that LNK from Catalog. Should work.

lukescammell
Posts: 744
Joined: 28 Jul 2006 13:15
Location: Kent, UK
Contact:

Post by lukescammell »

Great wrk-around Don - but will it be possible natively?
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)

JustinF
Posts: 358
Joined: 28 Jun 2005 23:47
Location: Omaha, Nebraska, USA

Post by JustinF »

Works great, thanks!

A "Command-line arguments:" text box would be a nice addition to the catalog item property page.
Justin
Windows 7 Professional

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Post by TheQwerty »

I want to re-open this topic as a new wish, because I really think this functionality should be included in XY in the first place.

The current workarounds are far from user friendly and have their own flaws which make them equally useless to most people.


Placing a shortcut in the Catalog may work fine for clicking on it, but you lose the ability to pass files with "open the selected items" or drag and drop, since it's not a supported file type.* Furthermore, shortcuts must have absolute paths, so it is no help when the user is using XY with programs on a portable drive.


Using a batch file works better and allows for relative paths, but means we completely lose the program's icon. If you have a number of programs where you need to do this, all those default batch icons become a bit annoying. You also have to put up with console windows popping up for a split second.


That leaves the last workaround of actually creating a launcher and compiling it into an EXE or COM with the original program's icon.

While that will work perfectly, anyone going this far is going to find it extremely silly that such basic functionality is missing from XY. Meanwhile, the users who aren't programmers are stuck with all the annoyances of the workarounds.


I cannot think of any reason this isn't already part of XY. So I suggest adding fields to the UDC -> Open With and Catalog items that allows the user to enter arguments which will be inserted before the selected item(s).

Please! I'm really getting sick of having to compile all these little launchers. :D


*This however does work when used with the UDC -> Open With command, but that doesn't really help with the catalog, or the absolute path issue.

admin
Site Admin
Posts: 65185
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

TheQwerty wrote:I want to re-open this topic...
I don't have the time to read your long post because I'm busy implementing launching apps with parameters. For Catalog and UDC... :)

Funny coincidence that you wish this now. It's almost finished and the power of it is just WOW. You'll get it tomorrow...

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Post by TheQwerty »

admin wrote:
TheQwerty wrote:I want to re-open this topic...
I don't have the time to read your long post because I'm busy implementing launching apps with parameters. For Catalog and UDC... :)

Funny coincidence that you wish this now. It's almost finished and the power of it is just WOW. You'll get it tomorrow...
Yay! :lol:

Post Reply