How to fix Error 2313 on Windows Server 2025 / Windows 11

Troubleshooting Guide: Error 2313 – Invalid Attribute Value

Why This Error Happens

Error 2313 occurs when the SQL Server 2025 installer or Windows Installer (MSI) engine encounters an attribute in the installation package that contains a value outside its accepted range or format. This is typically triggered by a corrupted installation cache file, a malformed registry entry left over from a previous install/uninstall, or an incompatible configuration property being passed during a command-line (unattended) installation. In most cases, the root cause is a damaged .msi package or stale Windows Installer cache data stored under the C:\Windows\Installer directory.

Step-by-Step Resolution Guide

Step 1: Clear the Windows Installer Cache

  • Open Command Prompt as Administrator.
  • Run msizap.exe TWG {Product-GUID} if you have the Windows SDK tools installed, or manually clear orphaned entries via C:\Windows\Installer.
  • Navigate to C:\ProgramData\Package Cache and rename the folder to Package Cache.old to force a clean rebuild on next install attempt.
  • Restart the Windows Installer service: net stop msiserver followed by net start msiserver.

Step 2: Validate the SQL Server 2025 Setup Media

  • Re-download the SQL Server 2025 ISO from the official Microsoft Volume Licensing or Evaluation Center to rule out a corrupted source file.
  • Mount the ISO and verify checksum integrity using Get-FileHash .\SQLServer2025-x64-ENU.iso -Algorithm SHA256 in PowerShell.
  • If running an unattended install, inspect your ConfigurationFile.ini for malformed string values (e.g., invalid characters in INSTANCENAME or SQLSYSADMINACCOUNTS).

Step 3: Repair or Reset the Registry Keys for SQL Server Components

  • Open regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server.
  • Look for any orphaned or duplicate keys referencing a previous SQL Server 2025 CTP/RC build.
  • Export the key as a backup, then delete any entries with blank or null-terminated attribute values that could be triggering the 2313 validation failure.
  • Reboot Windows Server 2025 / Windows 11 before attempting the installation again.

Step 4: Run the Installer with Verbose Logging

  • Execute the setup with full logging enabled to pinpoint the exact attribute causing the failure:
  • Setup.exe /Action=Install /QUIET /IACCEPTSQLSERVERLICENSETERMS /Log="C:\SQLLogs\sql_install_log.log"
  • Open the generated log and search for the string "Error 2313" to identify the specific property name listed in the %ls placeholder.

Alternative or Verification Steps

  • To verify the fix, re-run the SQL Server 2025 setup wizard and confirm it progresses past the Feature Selection screen without triggering the MSI validation error.
  • If the error persists, use the Microsoft Program Install and Uninstall Troubleshooter tool to fully purge remnants of SQL Server before attempting a fresh installation.