Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

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

Open
applesau opened this issue Nov 18, 2017 · 4 comments
Open

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

applesau opened this issue Nov 18, 2017 · 4 comments

Comments

@applesau
Copy link

applesau commented Nov 18, 2017

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
Copy link
Owner

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
Copy link
Author

applesau commented Aug 2, 2018

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
Copy link
Owner

zeobviouslyfakeacc commented Aug 3, 2018

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 😄

@applesau
Copy link
Author

applesau commented Aug 3, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants