ModLoaderInstaller icon indicating copy to clipboard operation
ModLoaderInstaller copied to clipboard

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

Open applesau opened this issue 6 years ago • 4 comments

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))

applesau avatar Nov 18 '17 23:11 applesau

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 😃

zeobviouslyfakeacc avatar Dec 07 '17 00:12 zeobviouslyfakeacc

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?

applesau avatar Aug 02 '18 14:08 applesau

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

  • Open Windows explorer
  • Find your TLD directory in Steam\SteamApps\common
  • Right click on "TheLongDark"
  • Go to the "Security" tab
  • Press the "Edit..." button
  • Grant "Users" the "Modify" permission by first selecting "Users" from the upper list and then checking the box next to "Modify" in the lower list
  • If prompted about applying these changes to subdirectories, agree and let it do its thing

or b) run Java as an administrator

  • Open the start menu
  • Type "cmd.exe"
  • While holding Control and Shift, press Enter to launch the command prompt as an admin
  • Use the cd command to navigate to the directory that contains ModLoaderInstaller.jar
  • Launch the installer by typing ModLoaderInstaller.jar and pressing Enter

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

zeobviouslyfakeacc avatar Aug 03 '18 02:08 zeobviouslyfakeacc

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.

applesau avatar Aug 03 '18 13:08 applesau