Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

Running command line scripts as external applications


Recommended Posts

Posted

Hello

I have created a few command line scripts to manage my cabinet (update roms from a network share, update mame, etc).

I am trying to add them to the external applications menu but it doesnt work. when lauching a script (from the "More program" menu) I see the desktop appear but the script doesnt execute.

I have enabled "show desktop" to yes in gamex configuration.

my scripts are in "C:\scripts" so this is what I set in the path of the external application. For the application I tried a few things. The first thing I tried is just the script name ie: "mameupdate.cmd" and I also tried to launch the command line with the script as a parameters ie: "c:\windows\system32\cmd.exe /C mameupdate.cmd".

both didnt work.

I can run the scripts manually with both method.

is there anything I am missing in my gameex config?

thanks all

Posted
Hello

I have created a few command line scripts to manage my cabinet (update roms from a network share, update mame, etc).

I am trying to add them to the external applications menu but it doesnt work. when lauching a script (from the "More program" menu) I see the desktop appear but the script doesnt execute.

I have enabled "show desktop" to yes in gamex configuration.

my scripts are in "C:\scripts" so this is what I set in the path of the external application. For the application I tried a few things. The first thing I tried is just the script name ie: "mameupdate.cmd" and I also tried to launch the command line with the script as a parameters ie: "c:\windows\system32\cmd.exe /C mameupdate.cmd".

both didnt work.

I can run the scripts manually with both method.

is there anything I am missing in my gameex config?

thanks all

According to GameEx it looks like the acceptable extensions are *.exe and *.bat. So maybe it's not being executed because you use *.cmd as your extension. I could be wrong however. But worth a try. Rename your scripts to have one of those extensions and try again.

Posted
According to GameEx it looks like the acceptable extensions are *.exe and *.bat. So maybe it's not being executed because you use *.cmd as your extension. I could be wrong however. But worth a try. Rename your scripts to have one of those extensions and try again.

I did some more troubleshooting last night.

Gameex will start .cmd scripts.

However, the command line window will not show up. On my PC with dual monitor, I put a process monitor on the second window and I can see that GameEx is spawing the process but it doesnt show up on the desktop nor in the task manager applications list.

is there a way to have the window showing so I can see what the script is doing? (again, showdesktop is set to yes)

Posted

Ok, I got it to work.

Have to use the "start" command to have the command line window to show up.

so the process is:

set "show desktop" to yes

set the path to: C:\windows\system32

set the command to: start cmd.exe /C "C:\scripts\my script.cmd"

cheers!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...