zeobviouslyfakeacc / ModLoaderInstaller

JavaFX application that installs a mod loader for the game The Long Dark
MIT License
51 stars 12 forks source link

Error: "The specified file was invalid or was not writeable." #4

Open applesau opened 6 years ago

applesau commented 6 years ago

What is says is "The specified file was invalid or was not writeable." Any way to fix? (When I clicked on the file it showed up as "valid, unpatched"(then the error showed up when I pressed enter))

zeobviouslyfakeacc commented 6 years ago

Hey! Sorry for taking so long to get back to you - I didn't receive email notifications again. Apparently, one needs to watch one's own repositories to get email notifications about new issues and PRs. Why isn't that the default setting? If only I knew!

Anyways, the "The specified file was invalid or was not writeable" error is shown when the file could not be read to be verified or could not be written to. As the installer already displayed that the file was "valid, unpatched", we can conclude that reading the file and the file itself were not the issue, but writing to it caused a problem.

Likely you're just missing the required write permissions as a regular user. Therefore, running the installer as an administrator should fix the issue. It might also be that the DLL is write-protected (for whatever reason), in which case you'd have to remove that file attribute manually.

If both of these don't work, I'll need to know what operating system you're using and what the path to the Rewired-Core.dll is on your system 😃

applesau commented 6 years ago

Well the problem was solved, it but it won't work for v1.31 it seems. Because everytime I run it to update it gives the same error message, "The specified file was invalid or not writeable," is this because of the update? Will I need to wait for the mod loader to be updated for v1.31?

zeobviouslyfakeacc commented 6 years ago

The mod loader should work with TLD v1.27 and up, including the current version.

The "The specified file was invalid or not writable" error almost always occurs because you're missing the required modify permission for files in your TLD install directory.

To fix this, either a) grant the required permissions

or b) run Java as an administrator

Please let me know whether this fixed your issue :smile:

applesau commented 6 years ago

Oh, thanks, the prior didn't work but then I used the latter and it solved my problem. Thank you I will try to remember this if I ever come across the same problem again.