0 files liked
1 comment
0 videos
0 uploads
0 followers
# OpenIV 4.1 + GTA V Enhanced – "Failed to read or save the XML file" without Legacy
## Environment
* **Game:** Grand Theft Auto V Enhanced
* **Store:** Epic Games
* **OpenIV:** 4.1
* **OS:** Windows 10/11
* **GTA V Enhanced installation path:** `F:\Epic Games\GTAVEnhanced`
* **OpenIV installation path:** `C:\Users\<username>\AppData\Local\New Technology Studio\Apps\OpenIV\`
## Problem
When trying to configure OpenIV 4.1 for GTA V Enhanced, OpenIV reports that `GTA5.exe` cannot be found in the selected GTA V directory.
This is expected because the Enhanced version uses:
```text
GTA5_Enhanced.exe
```
instead of the legacy:
```text
GTA5.exe
```
I then tried the **OpenIV Fix for GTA V Enhanced** patcher.
The patcher correctly found my OpenIV configuration file:
```text
C:\Users\<username>\AppData\Local\New Technology Studio\OpenIV\Application.xml
```
However, at step 3 it failed with:
```text
ERROR: Failed to read or save the XML file.
It might be corrupted or you don't have permission to write to it.
```
Running the patcher as administrator did not solve the problem.
## Investigation
The `Application.xml` file existed and was valid XML.
The relevant structure was:
```xml
<game id="Five" version="4.1" core="4.0" path="C:\Users\<username>\AppData\Local\New Technology Studio\Apps\OpenIV\OpenIV.exe">
<game>
<path/>
</game>
</game>
```
Looking at the patcher's batch script showed that it attempts to modify this node using PowerShell:
```powershell
$node = $xml.SelectSingleNode('//game[@id=''Five'']/game/path')
```
and then saves the XML using:
```powershell
$xml.Save($xmlPath)
```
For my installation, this operation failed even though the XML file existed and could be edited manually.
## Working solution without installing GTA V Legacy
Instead of using the patcher's XML modification step, I manually performed the required changes.
### 1. Edit `Application.xml`
The empty path:
```xml
<path/>
```
was changed to:
```xml
<path>F:\Epic Games\GTAVEnhanced</path>
```
The complete relevant section became:
```xml
<game id="Five" version="4.1" core="4.0" path="C:\Users\<username>\AppData\Local\New Technology Studio\Apps\OpenIV\OpenIV.exe">
<game>
<path>F:\Epic Games\GTAVEnhanced</path>
</game>
</game>
```
### 2. Create `GTA5.exe`
In the GTA V Enhanced installation directory:
```text
F:\Epic Games\GTAVEnhanced\
```
I created a copy of:
```text
GTA5_Enhanced.exe
```
and renamed the copy to:
```text
GTA5.exe
```
The original `GTA5_Enhanced.exe` was left untouched.
### 3. Create an empty `OpenIV.asi`
I created an empty file named:
```text
OpenIV.asi
```
in the GTA V Enhanced root directory.
### 4. Start OpenIV
After these changes, OpenIV successfully detected and opened the GTA V Enhanced installation.
**No GTA V Legacy installation was required.**
## Result
This worked successfully with:
```text
OpenIV 4.1
GTA V Enhanced
Epic Games
Windows
```
OpenIV can now access the GTA V Enhanced installation.
## Important note
The original OpenIV ASI Manager should **not** be used to install the legacy `OpenIV.asi` into GTA V Enhanced. The Enhanced patch documentation also warns against installing the original ASI Manager files because they are not compatible with Enhanced.
Also, this only makes OpenIV recognize/access the Enhanced installation. **Mods still need to be explicitly compatible with GTA V Enhanced.** Legacy/Gen8 RPF files should not simply be installed into Enhanced/Gen9, as this can cause crashes.
## Conclusion
If the OpenIV Enhanced patcher fails with:
```text
Failed to read or save the XML file
```
and `Application.xml` exists and is editable, a GTA V Legacy installation may not necessarily be required.
Manually setting the GTA V path in `Application.xml`, creating `GTA5.exe` as a copy of `GTA5_Enhanced.exe`, and creating an empty `OpenIV.asi` successfully solved the problem in my case.