Emulation Station - Launch windows game + additional exe
-
Hey guys,
I'm struggling to find a way to do this effectively.
I'm trying to launch streets of rage remake via emulation station and then launch an autohotkey exe file straight after it.
I made a bat file and when I test the file stand-alone, it works fine.
When I try and launch the bat file from Emulation Station, it displays odd behaviour, the bat file works however the game switches to the background whilst i see my windows desktop.
Any ideas guys?
-
If you are on a windows mashine try START
@echo off start x:\programms\autohotkey "your autohotkey scrpit here.ah" emulationstation
edit: Highlited Code Block
-
I'm a little lost... Why are there people asking for support on a Windows environment? Is there some trick to use RetroPie on Windows?
Like @makaveeti and this guy here: https://retropie.org.uk/forum/topic/11026/multiple-rom-path-for-a-single-system
-
@meleu Well I think that are just questions for the base using of OSes. As you know windows offers a lot and nothing :D RetroPie offers a full preset of settings.
AFAIK ES for windows ist also running fine - but no preset available :)
But I will answer the guy in your posting! -
Hi,
Apologies guys, I'll describe my issue more clearly. I'm using the latest build of EmulationStation on Windows 7 x64.
I've configured the systems I wish to emulate.
I'm trying to configure the launching of simple windows games (streets of rage remake in this instance).
My es_systems.cfg entry for windows games looks like this:
<system> <name>windows</name> <fullname>Windows</fullname> <path>~\.emulationstation\roms\windows</path> <extension>.lnk</extension> <command>"%ROM%"</command> <platform>windows</platform> <theme>windows</theme> </system>
I have the windows game streets of rage remake (folder labelled sorr) in the roms folder.
In the root roms folder I made a windows shortcut (.lnk) to the exe in the sorr folder. I tested this in ES and it launched perfectly.
I then created a windows shortcut in the root roms folder to a .bat file in the sorr folder. The bat file contains the following code:
@echo off
start sorr.exe
exitWhen I execute this .bat file within windows, the game launches perfectly. Full screen and starts playing.
When I execute the same from ES, the game launches however the result is a odd. The screen resolution is resized as per the game however I only see my desktop (with ES and the game running in the background) (see screenshot).
It feels like EmulationStation doesn't like .bat files. I replicated the exact same configuration in RetroFE and that works perfectly.
The reason why I need to use a batch file is that I need to launch 2 exes files for my windows games (1st exe is the game, 2nd is an AHK script in the form of an exe file).
Any ideas please?
-
@cyperghost - Can you offer any advice to my latest post please?
-
No not really. What does your script file do?
If you start the Batch file without the AHK then the windows also be hidden?
Why do you use lnk filemask to start bat files?
And annother maybe mistake.... Windows does not know~
Type
cmd
terminal opens writeset
There is a list of all variables....
Instead of ~ use %homepath% or %userprofile% or the full path -
@cyperghost Ignore the script file for now.
I'll simply the issue some more.
here is my entry for the es_system.cfg file:
<system> <name>windows</name> <fullname>Windows</fullname> <path>~\.emulationstation\roms\windows</path> <extension>.bat</extension> <command>"%ROM_RAW%"</command> <platform>windows</platform> <theme>windows</theme> </system>
My game folder (sorr) is in the roms folder. I have created a file in the root roms folder called sorr.bat. The contents of the bat file are:
@echo off
cd sorr
start sorr.exe
exitRunning the sorr.bat file from windows runs successfully as the game should.
Running the above file from ES results in an error 'windows cannot find sorr.exe'
If I copy the sorr game folder to C:\Emulationstation and then try run sorr.bat from ES, the game launches however it runs in the background with ES and shows me my desktop.
I'm afraid i'm not an advanced user of the command prompt and do not know how to set variables etc.
This behaviour seems to only occur with .bat files and ES. Maybe you can try replicate the issue and advise me what the cause is please?
-
@makaveeti I've done a bit with batch scripts on Windows with ES. This is what I did for scummvm:
I imagine you could adapt it for what you're trying to do. If it's being dumb remove spaces or throw in quotation marks. It's a tad picky. Good luck!
-
@herb_fargus Dude - you are a LEGEND! Your advice has solved my issue completely!
I used the following code in my .bat file
pushd "%HOMEPATH%.emulationstation\roms\windows\sorr"
start ahkscript.exe
%HOMEPATH%.emulationstation\systems\cmd.exe /C "sorr.exe"Both exes launch perfectly. Exiting the game shutsdown both the game and the ahkscirpt file as expected and it returns me to ES successfully.
I don't know how to thank you mate. I really appreciate your help. I was stuck and getting nowhere. Now I can focus on the hardware I need to run my ES system on.
You've made my day :)
-
@makaveeti glad you got it sorted :)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.