Option to Prevent Command Line Window from Popping Up At All

I have RetroArch incorporated into my HTPC in a setup that attempts to make playing games on it as seamless and hassle-free (after being set up, of course) as a dedicated game console. One of my longest-standing contentions with it is the extra command line window that pops up along with the program itself. I’d like for there to be a way to prevent it from appearing at all when launching games.

Using the “-D” command makes the command line window disappear. However, it still pops up for a brief moment.

Is there a way to make it not show up at all? If not, could an option to do this please be incorporated into RetroArch? Its popping up really takes one out of the console-ish experience I’ve otherwise set up.

Create a shortcut to retroarch.exe and make it start as minimized

This helps if I’m starting RetroArch as a standalone program. However, that’s not what I’m doing. What I’m doing is applying command line options to the main .exe. My setup has each game shown in a list. When I select a game, it launches RetroArch with the specific parameters I set for that game. I won’t be able to set any of these if I use a shortcut.

Is there anything else I could do that could remedy this?

You could launch from a frontend to suppress it. HyperSpin has a launch option called HIDDEN that hides it completely. RetroFE also does that by default. I forget if EmulationStation can do that as well, but probably. Of these, I only know HyperSpin has a way of launching with per game settings. RetroFE will hopefully support that soon (a beta of that released recently and I’m liking it the most out of all the frontends I’ve tried). Technically, if you pair it with HyperLaunch you can get per game settings, but that adds quite a bit of extra complication.

Yeah, I searched around a little bit before I posted this topic. I still am, honestly. I saw the HyperSpin-based solution to this issue. I don’t have any intention to use it, though. Maybe if I was using an arcade system for it, but it doesn’t feel right on a TV.

It seems kind of trivial to add this option into RetroArch itself. Not sure if it actually is, I’m just guessing so as a user. Could such a feature please be considered?

I probably should have specified. I’m using Advanced Launcher in Kodi (technically XBMC for me since I’m still on v13.2) to launch my games. I’m aware of the in-development RetroPlayer, hoping it turns out great.

Anyways, I found a longer, likely-inefficient method to get my desired results.

  1. Set the launcher program to a batch file (I set it so batch files don’t pop up, FYI) that changes the directory to where your RetroArch executable is.
  2. Set the arguments to the following:

cd [RetroArch directory] && start /min retroarch “%rom%”

Then add any game-/core-specific arguments you have following that. I don’t know why you have to do the cd again, excluding it will make it not work.

It feels like I could be doing something else to make this more efficient, but I feel rather satisfied just having a solution. Hopefully anyone else in my predicament might find this information useful!

Ive been messing with this for literally about 6 hours and still cant get anything to work but I feel like Im really close .

I found this superuser.com solution that someone posted which mentions saving


CreateObject("Wscript.Shell").Run ""   & WScript.Arguments(0) & "", 0,   False

as invisible.vbs and running it like

wscript.exe "\path	o\invisible.vbs" "\path	o\retroarch.exe"

Which does actually work if I run it exactly like that, but I cant figure out how to get my retroarch paramaters (-L \path o\core.dll \path o\rom.zip) working correctly (I have no idea where to put quotes and where not to, I suck at this shit)

To complicate things even more Im currently trying to use Rom Collection Browser to launch my games in retroarch. It has me choose one executable for my emulator in the first box and pass it parameters in the second box. I figure Im going to have to point to wscript.exe as my emulator, then put everything else in the parameters box.

Could anybody with more experience help me figure out the exact command I need to run?

So far this works…


wscript.exe   "C:\Games\Emulators\invisible.vbs" "C:\Games\Emulators\RetroArch_1.2.2\retroarch.exe"

but this doesn’t…


wscript.exe   "C:\Games\Emulators\invisible.vbs" "C:\Games\Emulators\RetroArch_1.2.2\retroarch.exe -L C:\Games\Emulators\RetroArch_1.2.2\cores\bsnes_balanced_libretro.dll D:\Storage\Games\Roms\SNES\Super Mario World (U) [!].zip"

please help…

The solution is very easy, rebuild and add -mwindows to ldflags, then the console is completely disabled

On linux I have no problem compiling software, but in windows I don’t even know where to start.

Try this guide https://gist.github.com/heuripedes/b6da0fea68b648bdd2ae

Is disabling the console with a setting in retroarch.cfg or a command line switch something that could be implemented? I launch from Steam now and that doesn’t have an easy way to hide it. I use the -D switch so it only appears for a second, so it’s not a huge deal. But it’d be nice to be able to disable it easily without having to compile a special build.

Edit: I see you made an issue on git about it :smiley:

No, it’s a compile time flag. I just launch RA minimized then the console is hidden from the beginning.

The option is to log to file, it’s easier anyway since the default windows console is pretty much useless

Ok that would work for me too, so how do you launch retroarch minimized with arguments? (I know its just a simple syntax error preventing any of this stuff from working, I just suck at this technical shit)

I get that I can do

start /min C:\Games\Emulators\RetroArch_1.2.2\retroarch.exe 

but if I do

start /min C:\Games\Emulators\RetroArch_1.2.2\retroarch.exe -L C:\Games\Emulators\RetroArch_1.2.2\cores\bsnes_balanced_libretro.dll D:\Games\Roms\SNES\Super Mario World (U) [!].zip

it doesn’t work

I just need help getting the syntax right (where to put quotes etc…)

Then after I get the syntax right I need to figure out how to launch it from rom collection browser (which has you browse to an executable in the first box and pass it arguments in the second)

I just now looked at the link you provided, msys2 looks amazing. Ive tried building things in cygwin before and just gave up because all the frustration hunting down and building all the dependencies and dependencies of dependencies and all that good stuff, but with pacman built in i dont think i can go wrong. Now I just need some free time…

Sorry for bumping such an old thread, but I was wondering the same thing, and didn’t want to have to compile RetroArch myself. I ended up creating a simple app that runs RetroArch in hidden window mode, which effectively hides the console window.

Here’s a download: https://d.sb/ranc-dl

Instructions:

  1. Download it
  2. Copy RetroArchNoConsole.exe to the same directory as your RetroArch installation
  3. Run RetroArchNoConsole.exe instead of RetroArch.exe. It takes all the same command line arguments

I’m using it with Steam Link (using Steam ROM Manager to add all my games as shortcuts in Steam) and it seems to be working well for me. Previously I was having some issues with Steam Link where it’d sometimes only show the console window rather than the actual game.

Source code is here: https://github.com/Daniel15/RetroArchNoConsole/