Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


.bat files not launching
LinkX2011 Offline
Junior Member

Posts: 8
Threads: 1
Joined: May 2016
Reputation: 0
#1
.bat files not launching

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.
05-04-2016, 09:00 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: .bat files not launching

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>

05-04-2016, 10:38 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#3
RE: .bat files not launching

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

05-05-2016, 04:58 AM
Find
LinkX2011 Offline
Junior Member

Posts: 8
Threads: 1
Joined: May 2016
Reputation: 0
#4
RE: .bat files not launching

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?


Attached Files
.png   error.png (Size: 4.12 KB / Downloads: 159)
05-07-2016, 03:56 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: .bat files not launching

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:

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

(This post was last modified: 05-07-2016, 04:29 PM by Mudbill.)
05-07-2016, 04:29 PM
Find
Spelos Away
Banned

Posts: 231
Threads: 19
Joined: Sep 2014
#6
RE: .bat files not launching

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:

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.
05-08-2016, 07:43 PM
Find
LinkX2011 Offline
Junior Member

Posts: 8
Threads: 1
Joined: May 2016
Reputation: 0
#7
RE: .bat files not launching

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.


Attached Files
.png   files.png (Size: 64.66 KB / Downloads: 123)
05-08-2016, 09:11 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: .bat files not launching

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

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.

(This post was last modified: 05-08-2016, 09:21 PM by Mudbill.)
05-08-2016, 09:18 PM
Find
LinkX2011 Offline
Junior Member

Posts: 8
Threads: 1
Joined: May 2016
Reputation: 0
#9
RE: .bat files not launching

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.
05-11-2016, 10:12 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#10
RE: .bat files not launching

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

(This post was last modified: 05-12-2016, 01:08 AM by Daemian.)
05-12-2016, 12:54 AM
Find




Users browsing this thread: 1 Guest(s)