It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Hello,

I've been trying to launch GOG games by making .bat files that contains the directory to the game's exes. That
way I'll be able to make custom tiles in the Start Menu.

So far, using .bat files works perfectly for any exe file except for GOG games for some reason.
I have tried this with Spelunky and Stardew Valley so far. Spelunky gives an "error generating config file" and Stardew Valley simply just doesn't launch when double-clicking the associated .bat file (it shows in the log that Stardew Valley has crashed). Launching the games using the exe files works perfectly.

What could possibly be the cause of this?
No posts in this topic were marked as the solution yet. If you can help, add your reply
avatar
JohnnyGui: Hello,
OK so we need to see your code to help but here is an example of notepad
Start "" "%windir%\system32\notepad.exe"
this will launch notepad and kill the named window that the start command requires. try it with your games launch exe
avatar
JohnnyGui: Hello,
avatar
Starkrun: OK so we need to see your code to help but here is an example of notepad

Start "" "%windir%\system32\notepad.exe"
avatar
Starkrun: this will launch notepad and kill the named window that the start command requires. try it with your games launch exe
I make the .bat file by opening Notepad, pasting the directory path of the .exe file in quotes (for example: "C:\GOG Games\Spelunky\Spelunky.exe") and then save it as a .bat file.

When putting your mentioned command in Notepad like this: Start "" "C:\GOG Games\Spelunky\Spelunky.exe" then it gives the same mentioned problems for Spelunky and Stardew Valley.
Post edited June 08, 2017 by JohnnyGui
Have you tried running the command manually from the prompt? Do you get the same error?
What if you run it as administrator?

Btw.. what are you trying to do exactly?
For custom tiles in the Start Menu.. don't you just need a normal link?
Post edited June 08, 2017 by phaolo
avatar
phaolo: Have you tried running the command manually from the prompt? Do you get the same error?
What if you run it as administrator?

Btw.. what are you trying to do exactly?
For custom tiles in the Start Menu.. don't you just need a normal link?
I get the same problem when running the command through the command prompt. Same when I run it as administrator.
It's very weird since the shortcuts of the 2 GOG games work perfectly. But as soon as I try to launch them through a command line, they stop working for some reason.

Regarding the custom tiles, here's the thing. I have a app that makes these custom tiles for the Start menu. In that app you pick the directory path of the .exe file to make the custom tile. The app uses that directory path as a command line to launch the .exe file through the created custom tile.
But since the 2 GOG games have problems with them being launched through command lines in the first place, I'm trying to solve that problem through .bat files or command prompts first.
Post edited June 09, 2017 by JohnnyGui
avatar
JohnnyGui: Snip...
GOOD NEWS EVERYONE! I replicated your issue with same error and everything and found a solution!
cd "C:\GOG Games\Spelunky\"
Spelunky.exe
cut and paste this into a notepad and save as whatever.bat

no error and launches every time ^_^ also sidenote I now own Spelunky <3
Attachments:
Post edited June 09, 2017 by Starkrun
avatar
Starkrun: GOOD NEWS EVERYONE! [...] I now own Spelunky <3
That is good news! :P
Now, your first mission (should you choose to accept it): finish the first level alive. =D
avatar
Starkrun: cd "C:\GOG Games\Spelunky\"
Spelunky.exe
So Galaxy was trying to use the current dir instead of a fixed path? -_-'
avatar
phaolo: So Galaxy was trying to use the current dir instead of a fixed path? -_-'
What does Galaxy have to do with anything...? You're the first to mention it in this thread.
avatar
phaolo: So Galaxy was trying to use the current dir instead of a fixed path? -_-'
avatar
paladin181: What does Galaxy have to do with anything...? You're the first to mention it in this thread.
Uh..I.. probably got confused, but I meant that the game launcher was trying to use the current dir instead of a fixed path.
Unless it's some strange batch error I'm not aware of.
Post edited June 09, 2017 by phaolo
avatar
phaolo: Unless it's some strange batch error I'm not aware of.
this right here... using a bat to directly launch, even with proper commands it failed. I had to change directory and then launch the file to make it work... very odd, but hey solution found ^_^
avatar
JohnnyGui: Snip...
avatar
Starkrun: GOOD NEWS EVERYONE! I replicated your issue with same error and everything and found a solution!

cd "C:\GOG Games\Spelunky\"
Spelunky.exe
avatar
Starkrun: cut and paste this into a notepad and save as whatever.bat

no error and launches every time ^_^ also sidenote I now own Spelunky <3
Wow, this actually worked for Spelunky. Thanks a lot!

Your command line still doesn't work for Stardew Valley though.. What could possibly be the cause here?


avatar
phaolo: Unless it's some strange batch error I'm not aware of.
avatar
Starkrun: this right here... using a bat to directly launch, even with proper commands it failed. I had to change directory and then launch the file to make it work... very odd, but hey solution found ^_^
So if you install Spelunky somewhere else than C:/GOG Games/ then the standard command line would work?
Post edited June 10, 2017 by JohnnyGui
No one who could help me fix this problem with Stardew Valley?
In Batch file CD to game folder then try executing game.
Post edited June 13, 2017 by mechmouse
Is there a space in the file name?
If so - try putting it in quotation marks:
"file name.exe"