mojira.dev
MCL-5294

Cannot set other AppData directory

Mod Edit

We always intended you to use --workDir /path/to/wherever, I didn't know so many people were using the APPDATA workaround. We can't support that going forward, so you'll just have to use the command line argument sorry!

– @unknown

I have been running Minecraft with a changed appdata directory for ages now as I don't want it to store settings, worlds and other data on the normal AppData folder of my system drive. This doesn't seem to be possible anymore, it simply ignores the changing of the variable.

Batch script used:

Minecraft.bat

set "APPDATA=%~dp0"
start MinecraftLauncher.exe

Where %~dp0 automatically gets replaced with the current directory that the batch file resides in but it doesn't work with a full path either.

I've reported that error before when the testing launcher was released but it seems that it went below the radar.

Linked issues

MC-144373 minecraft Launcher not worked in Japanese ← I'm sorry, I will correct this. Symbolic link has a problem. Resolved MCL-5385 'Game directory is invalid or inaccessible' when a junction is used or an appdata environment path is used Resolved MCL-5399 Launcher doesn't support different installation directory anymore Resolved MCL-5412 New Launcher doesn't respect changes to APPDATA location Resolved MCL-5528 Can't use hard-linked .minecraft directory Resolved

Comments 13

Please do not mark unreleased versions as affected.
You don't have access to them yet.

Version 2.0.700 was released today, get your stuff together, bot 😛

Please do not mark unreleased versions as affected.
You don't have access to them yet.

Please do not mark unreleased versions as affected.
You don't have access to them yet.

Just ignore the bot for now.

3 more comments

Right now there's --workDir /foo/bar, --lockDir /foo/bar (for portable installs, require all game directories be in that folder) and we just added --config foobar (request the specific game configuration by name or ID, instead of picking the last used)

Adding a --help is on my todo list!

So using this clue from Nathan I was able to get mine working. So let me share:
I'm using Win10 and Minecraft installed on C: (ssd) and my folder 'roaming/.minecraft' is a Junction point (aka Link) to 'D:/Minecraft/.minecraft'
With the 2.0 Launcher this stopped working, To get around this...

Right click the Minecraft tile or menu and choose More and choose Open File Location.
Right click the Minecraft shortcut and choose properties.
In the Target box, after the MinecraftLauncher.exe" I added the --workDir option. So my Target is now:
"C:\Program Files (x86)\Minecraft\MinecraftLauncher.exe" --workDir G:\Minecraft\.minecraft

This seems to work fine with out the lockDir nor config options needed.

yeah, i'm also having issues with junction points. literally no other programs i use have an issue with junction points. the old launcher works fine. i see no point in upgrading until this is fixed.

I suggest you open an extra ticket for that issue as this was about the set "APPDATA=%~dp0" method, not the --workDir parameter.

If anyone is viewing this bug due to issues with a junction / hardlinked .minecraft directory, you may be able to work around it simply by changing the launch options for "game directory" within the launcher (to the real location instead of the AppData/.minecraft) without using --workdir. (Worked for me; YMMV.)

migrated

Nathan Adams

Unconfirmed

Retrieved