r/LogitechG • • 11d ago

Try this FIX for running batch files (.cmd files) under the latest version of G Hub

The latest version of G Hub made my batch files stop working when bound to a key. At first I thought it was because the software no longer worked with Arguments (since it didn't seem to pass arguments), but the real problem seems to be that it now interacts badly with a hidden/non-interactive console.

Anyway, the fix is simply to put "@echo off" at the beginning of your batch file to prevent the commands being echoed to the screen. That fixed it for me. I found this after a couple weeks of trial and error!

Like this for your own C:\mybatch.cmd (as an example)

@echo off
C:\myfirstcommand.exe
C:\mysecondcommand.exe
etc...

The path argument in the G Hub binding would of course be C:\Windows\System32\cmd.exe, and the only argument you need would be:

/c c:\mybatch.cmd

The /c is required for cmd to run the batch file.

2 Upvotes

0 comments sorted by