Execute terminal command from catalogue item

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Wublide
Posts: 49
Joined: 30 Jan 2018 16:57

Execute terminal command from catalogue item

Post by Wublide »

As title, how could I achieve this?

RalphM
Posts: 2054
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Execute terminal command from catalogue item

Post by RalphM »

Check help for scripting commands "run", "runq" and "runret" then use it in your catalog item.
Ralph :)
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)

Wublide
Posts: 49
Joined: 30 Jan 2018 16:57

Re: Execute terminal command from catalogue item

Post by Wublide »

RalphM wrote: 18 Jul 2022 17:15 Check help for scripting commands "run", "runq" and "runret" then use it in your catalog item.
thank you, got the command work flawlessly throug that script commands but now how I add the script line in the catalogue as an item? already tried the location box unsuccesfully with this syntax

Code: Select all

run "<mycommand>"
edit: found out the correct syntax:

Code: Select all

::run "<mycommand>"

Wublide
Posts: 49
Joined: 30 Jan 2018 16:57

Re: Execute terminal command from catalogue item

Post by Wublide »

one more problem: seems like that the cmd PAUSE command is not recognized and the script terminal windows is closed after the execution. How to solve this?

highend
Posts: 14670
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Execute terminal command from catalogue item

Post by highend »

Which command are you executing exactly?
One of my scripts helped you out? Please donate via Paypal

Wublide
Posts: 49
Joined: 30 Jan 2018 16:57

Re: Execute terminal command from catalogue item

Post by Wublide »

highend wrote: 18 Jul 2022 18:40 Which command are you executing exactly?
executing an .exe file with parameters. As now I have that working through a .bat file like this:

Code: Select all

myapp.exe -option - option
PAUSE
the PAUSE deny the prompt closing on the end of command execution but in xyplorer the PAUSE command is not working

Code: Select all

::run "myapp.exe -option -option && PAUSE"
as if xyplorer is forcing the close of terminal window

edit:

solved with this syntax

Code: Select all

 run "C:\Windows\System32\cmd.exe cmd /C myapp.exe -option -option && PAUSE" 

Post Reply