Windows 10 is pretty picky about what is allowed to create files on the Desktop.
I created C:\Users\frono\Documents\experiment
The directory is empty.
I copied/moved a KoLmafia jar file there. There is one file.
Code:
Directory of C:\Users\frono\Documents\experiment
01/19/2024 09:19 AM <DIR> .
01/19/2024 09:19 AM <DIR> ..
01/19/2024 08:11 AM 27,819,980 KoLmafia-27809.jar
1 File(s) 27,819,980 bytes
2 Dir(s) 34,563,923,968 bytes free
I started KoLmafia by double-clicking on it.
I got the login screen and the preferences screen. I exited rather than log in.
The directory contents are now:
Code:
Directory of C:\Users\frono\Documents\experiment
01/19/2024 09:21 AM <DIR> .
01/19/2024 09:21 AM <DIR> ..
01/19/2024 09:22 AM <DIR> data
01/19/2024 09:21 AM <DIR> images
01/19/2024 08:11 AM 27,819,980 KoLmafia-27809.jar
01/19/2024 09:21 AM <DIR> relay
01/19/2024 09:21 AM <DIR> scripts
01/19/2024 09:21 AM <DIR> settings
1 File(s) 27,819,980 bytes
7 Dir(s) 34,562,371,584 bytes free
If you try and do the same thing you should have the same directories created.
If you do not have the same directories then creating a directory is part of the problem. usually it is a permissions problem - the operating system User is not allowed to create/write in that directory. In a few cases the operating system thought there was no space on the disk and thus could not create a directory or a file. There are probably other more obscure causes.
Since this is a new install and I didn't log in there is no sessions subdirectory. When I started KoLmafia up and logged in my anti-virus popped up and said I needed to allow KoLmafia to create a file. So an antivirus product may be overly aggressive.
After a normal login the sessions directory looks like
Code:
Directory of C:\Users\frono\Documents\experiment\sessions
01/19/2024 09:33 AM <DIR> .
01/19/2024 09:33 AM <DIR> ..
01/19/2024 09:33 AM 17 active_session.fronobulax
01/19/2024 09:33 AM 0 fronobulax_20240119.txt
2 File(s) 17 bytes
2 Dir(s) 34,560,077,824 bytes free
The "Could not acquire file lock for " message occurs when the active_session file for the user cannot be created, if it doesn't exist, or if it is being used by something else, if it does exist. if the something else is another existence of KoLmafia then shut them all down and try again. The nuclear option would be to reboot the computer which should have the side effect of shutting down anything that did not exit normally and so was holding the file lock.
Perhaps you could try a similar experiment? If you don't get similar results then that tells us something. If you do get similar results then we may need to focus on how you launch KoLmafia and what it is using for Java.