Noob question, Can GDEVELOP run a batch file

How do I…
get GDEVELOP to run an external windows batch file when a button is clicked?

My project will run in Windows, not in a browser, and I need to have a simple function where, when the user clicks a button, a batch file will be launched from a specific folder on the users drive.

Is this possible? and what action would achieve this?

Physically possible? Yes. I believe the “Open URL” action will open local file names if you know the exact path.
Likely to work? No. Most antivirus will block electron (and most apps) from launching batch files, as well as Windows UAC. That type of action is generally viewed as malicious.

Thank you so much for the response. I had not considered the security issue… good point! Would be nice to be able to do this inside Windows desktop applications. Its okay in this case, as what I want to do is very simple, and I can achieve the same by making a batch file that launches the Gdevelope app, then runs the required script. Not ideal, but will do the job. Thanks again.

1 Like