Minecraft doesn’t work if there is a “!” in the System username

minecraft-java-editiontechnical-issues

I have downloaded minecraft on my windows vista x64 computer but I when I click to run it and tried to log in a black screen appears. Because Im bloody brilliant i figured it might be a problem with my windows username which ironically is "Linux Plx!".

I created a new username just for minecraft called "linux" and it works well there. The problem is all my programs are already on "linux plx" and I don't want to use the new account just for Minecraft (not to mention my internet doesn't work there because my drivers are not installed there etc)

I wonder if there is any way to get my minecraft to work despite my windows username. It has to be some part of the program not recognizing the "!" in the path.

I tried renamiing my windows username but it doesn't really rename it (because windows doesn't really allow you to change the username when you look into it, for on the software level, the username is still "linux plx!")

How do I fix this problem?

Best Answer

Assuming you are running Windows Vista/7. The procedure would work for other versions of Windows but the PATHs will be different.

  • Create a folder named C:\Users\Public\Minecraft
  • Download the Minecraft.exe file and save it into that folder
  • Create a batch file named start-minecraft.bat (or whatever you want) and save it on your desktop or wherever you want to click to start Minecraft
  • The contents of the batch file should be

start-minecraft.bat

@echo off
:: set the app data to be a path that doesn't break minecraft
set APPDATA=%PUBLIC%\Minecraft
:: start up minecraft
%PUBLIC%\Minecraft\Minecraft.exe

Basically we just need to set the APPDATA variable to a directory that Minecraft will consider to be valid.

P.S. This same procedure can be used to keep multilpe different versions of Minecraft installed. Just create a different folder for each version, and update the APPDATA variable to reflect that.