Frictional Games Forum (read-only)
.bat files not launching - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: General Discussion (https://www.frictionalgames.com/forum/forum-18.html)
+--- Thread: .bat files not launching (/thread-46243.html)

Pages: 1 2 3


.bat files not launching - LinkX2011 - 05-04-2016

I've been trying to get some new full conversion mods to run on my Amnesia. I've been playing the game for a couple of years and have run multiple full conversion mods with no trouble. After I recently factory reset my computer and reinstalled the game, I haven't been able to get any full conversion mods working. All of the mods are installed in the correct folder and when I click to open the .bat file, there is no error message. It opens as normal and closes quickly without launching the game. The path is correct and it launches through Launcher.exe. I've changed it to launch through Amnesia.exe which doesn't work at all. Anyone have this problem and know how to fix it?
I also have the Steam version.


RE: .bat files not launching - Mudbill - 05-04-2016

Edit the .bat file and add "pause" on a new line at the bottom. This should make so that it stays open after finishing, letting you see the error of why it doesn't launch.

If bat files are bothering you, I could suggest my *ahem* Modloader, linked in my signature.
</shameless_self_promotion>


RE: .bat files not launching - Daemian - 05-05-2016

lol.
Also try running those launchers as administrator. You may have lost some permissions on the reset.


RE: .bat files not launching - LinkX2011 - 05-07-2016

Thanks for the reply, Mudbill. Doing what you said showed me that the Amnesia Launcher (Launcher.exe) is "not recognized as an internal or an external command, operable program or batch file." I'm not the best with bat files and things like that. Any ideas?


RE: .bat files not launching - Mudbill - 05-07-2016

Where is your bat file located? It's currently running from your System32 folder, which obviously is not where Launcher.exe is. Your bat file needs to be located next to Launcher.exe for it to find it.

Also, if your folder names contain spaces (which I recommend against), then you must use double quotes around your paths. Like so:

Code:
Launcher.exe "Amnesia Dark Horror\DH_config\main_init.cfg"



RE: .bat files not launching - Spelos - 05-08-2016

I agree with what Mudbill said.

Bare in mind that if Launcher.exe is not located in your mod's folder (which it's obviously not), you need to go up a directory.

You could do that by adding "..\" to the location, though I prefer pushing the working directory before executing the code itself...

I would do something like this:

Code:
pushd ..\
Launcher.exe "Amnesia Dark Horror\DH_config\main_init.cfg"

Also... another tip... Don't launch it as an administrator.
The default directory for that is the System32 folder.
You do have rights to launch applications.


RE: .bat files not launching - LinkX2011 - 05-08-2016

The .bat file and Launcher.exe are both in the main Amnesia folder. I also changed the name of the folder of Amnesia Dark Horror to ADH and also changed the path for the .bat file to reflect the changes to the folder. I have no idea why it's running from my System32 folder. Also, Spelos, the pushd command resulted in the same error.


RE: .bat files not launching - Mudbill - 05-08-2016

Try this then. Edit your .bat launcher to start like so:

Code:
pushd %~dp0
Launcher.exe ADH\DH_config\main_init.cfg

I think the issue is computer related, and something in your system causes it to default to System32. Do you have UAC disabled perhaps? If you run a bat file or command prompt as admin, it will do this, otherwise defaults to current dir. This code should reset the dir back to the current one.


RE: .bat files not launching - LinkX2011 - 05-11-2016

That code didn't work for whatever reason. I've been using the same computer I always have used to run full conversion mods, it just had a factory reset. It's probably something with the computer itself but I honestly have no idea because I've never seen anyone have a problem like this on any forum.


RE: .bat files not launching - Daemian - 05-12-2016

Try using a shortcut, you can specify a working directory there. It can be a temporary solution.

- Right click the .bat, from the menu select Send To -> Desktop (Create Shortcut)
- Right click the new shortcut on the desktop, select properties, on the box Start In enter the path to the mod and accept.
(example: Start In: D:\Amnesia\redist\mymod\).
- Run the shortcut.


Edit: Another way is to create a shortcut to Launcher.exe and edit its properties. On Target add what the .bat contains (without the executable's name).

Example:
Inside batch says Launcher.exe MyMod/Config/main_init.cfg
You copy this path: MyMod/Config/main_init.cfg
And you paste it in Target on the shortcut's properties.

Result: Target: D:/Amnesia/redist/Launcher.exe MyMod/Config/main_init.cfg