Hi @yasinfect
Thank you for reaching out to the SQL forum.
The error occurs due to corrupted or incomplete installation package, or missing system components required to run the installer.
Please try below things to fix the issue.
- Right-click the installer (setup.exe) and choose "Run as administrator".
- Make sure your Windows OS is fully updated. Missing updates can prevent required DLLs from functioning.
- Check that .NET Framework 3.5 and 4.8 are installed and enabled via
Control Panel --> Programs --> Turn Windows features on or off
- Download the latest SQL Server Express installer directly from the official Microsoft site.
- Use the SQL Server Installation Center or Microsoft Install/Uninstall Troubleshooter to remove any partial installations or Clean Previous Install components.
- Open the log file in below path.
C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Log\20250928_160300
Look for lines mentioning error, failed, or return value 3 to pinpoint the exact cause.
- Some antivirus software may block DLL execution during setup. Try disabling it temporarily during installation.
- Use the SQL Server 2022 Media Edition not Basic, The Basic web installer sometimes fails to fetch DLLs on restricted or unstable networks. Instead, download the offline installer “Custom/Download Media” option from Microsoft’s site and install from the offline setup.
- Check Windows Installer Service, Make sure the Windows Installer service is active. Press Win + R, type services.msc, and press Enter. Find Windows Installer, right-click --> Start or Restart if running.
- Some required DLLs fail to load if the Visual C++ runtime is missing.
Download and install both of these from Microsoft.
Visual C++ Redistributable for Visual Studio 2015–2022 (x64)
Visual C++ Redistributable for Visual Studio 2015–2022 (x86)
Note: After installing both, restart again.
- Sometimes an incomplete setup blocks reinstallation.
Open Control Panel --> Programs --> Programs and Features
a. Uninstall anything that starts with below things.
Microsoft SQL Server 2022
Microsoft SQL Server Native Client
Microsoft SQL Server Setup Support Files
b. Delete the below setup folders if they exist.
C:\Program Files\Microsoft SQL Server\
C:\Program Files (x86)\Microsoft SQL Server\
C:\ProgramData\Microsoft\SQL Server\
And then restart your computer.
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh