How do I run Resident Evil 4 HD Project Mod .bat files?

I bought Resident Evil 4 Ultimate Edition on Steam because of the HD Project mod, and I followed the instructions to download the mod available on the site. But there is a part where you have to run a .bat file and Linux don’t run this type files, this bat move the mod files into the game folder, so it’s obligatory to run it. I made a post in reddit about the issue, and one person said I should manually convert the bat commands to bash, but it’s very hard for me to understand both bat and bash languages. So I used Wine to help me, and found out that it can run bat files and tried it out, but when the files were being moved, this line appeared in all lines

Path not found.
wine: Read access denied for device L"\??\Z:\", FS volume label and serial are not available.

Does someone knows what is the problem and how to fix it so I can install the mod?

Hello @HenriqueDorituz and welcome :wink:

Since the bat script does only copy/move files, it should be really easy to convert it.

It is not clear where you run it, in which prefix, what the working directory is and what the script does. So, no idea, but Z:\ in wine is normally / in linux.

Thanks for the welcoming! I’m using Manjaro and Linux in general for only two months and i already love the OS and the community.

About where, the prefix and the directory of the script:
I runned Wine in Terminal, using the prefix wine in the directory file:///home/henrique/.local/share/Steam/steamapps/common/Resident Evil 4/install-script.bat
The directory that I am running is the folder where the game is located in Steam, in the game folder the guide says that you have to put the mod folder inside /Resident Evil 4 (with Bin32 and BIO4 on the side, that are the game files that will be replaced), and run the bat file inside the /Resident Evil 4 folder, making the transfer of the old texture files for the new ones. When I run this command on terminal using Wine, the bat file proceeds ok. It says like “Do you want to replace the files? [Y] [N]” and when you answer all the questions the installation begins and this “Path Not Found” error appears.

I think this Z:\ thing is running in the directory that wine create. I tried before using wineconsole to do the trick, and it only let me use files from inside this Z directory, and not from the / directory. It gave the same error, but in the wineconsole instead of the Linux one.

Does this help to solve my problem? Sorry if I said something wrong or difficult to understand, english is not my first language, and I am a extreme noob at Linux. And thanks for answering.

That is already wrong… the prefix must be /home/henrique/.local/share/Steam/steamapps/compat/254700 what would be the wine prefix for this game. /home/henrique/.local/share/Steam/steamapps/common/Resident Evil 4/ is the real game.

I would suggest to use protontricks:

pamac build protontricks-git

Then just run:

protontricks --gui

and you can choose the game and it will start winetricks inside this prefix. There you select the default prefix and then run a commandline shell. Inside the new shell window you should be able to run the bat. :wink:

Maybe show the script, and maybe it is really basic, and you could just move files manually in two minutes…

I did it all and got to the part where I should run the bat file, but what prefix should I use for doing it? I tried using wine again, and gave me this

wineserver: using server-side synchronization.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
0024:err:process:exec_process L"Z:\home\henrique\.local\share\Steam\steamapps\common\Resident Evil 4\install-script.bat" not supported on this system

Then using `/home/henrique/.local/share/Steam/steamapps/compat/254700 as a prefix and the Terminal didn’t recognize it.

@HenriqueDorituz

I guess you did not what I suggested… anyway, I agree with @omano. Please post the content of the script as code :wink:

From what I understand, the script should backup the original files in a folder, and copy the modified files to the game folder. But the download is 20GB so I’m not downloading it to look at the script, so yeah please share the script so that we get that done quickly instead of messing with it in WINE.

https://dpaste.com/B6TH8PE7P


Moderator edit: Replaced unformatted text with link from OP’s Reddit post

Please edit your post and make the script as CODE in your message with the help of the dedicated button </> or post directly on an external site like pastebin.com because currently it is unreadable.

Seems like it has installation steps.

1 Like

sorry, didn’t know it had to do this. I’ll send it via message, because I can’t send links in my posts.

I’ve edited your post to include the link. :wink:

1 Like

The script is a little more complicated than anticipated but still it does basically what I expected. Due to its length, I pass on helping converting it.

However, I think you could still manually move the files from the mod folder to your game folder, I don’t think it should be complicated, but I do not have the content of the mod or the game under my eyes so I can’t really help either.

First I would make a backup of the game folder somewhere safe, so you can mess things up and still have a possibility of starting over by replacing the messed up game folder by the backup.

Then open side by side the mod folder, and the game folder, I think they should contain both similar folders, and it should be a simple matter of replacing the game ones with the mod ones (didn’t read everything in the .BAT file so maybe there is a step I missed but what I read basically does that).

Also, on a side note, when you tried the script in WINE how did you do that? Did you place the mod folder and the script inside your game folder? Did you place somewhere else?

When I tried to run the script, I had put the mod folder and the script in the same directory “file:///home/henrique/.local/share/Steam/steamapps/common/Resident Evil 4” in this directory there are the game folders and both mod folder and .bat file. I tried other ways, like putting a copy of the game folder inside the Z: of Wine and running in wineconsole. And then I tried the method megavolt gave in the replys.
I’m going to replace the files without the .bat file and see if it work like you said and give feedback of how it went.

Don’t forget to make a backup of the game folder first, so you can try and fail without consequences, or else you would need to download the game files again if you break the game.

1 Like