Ok searched on internet.
with this link https://www.thewindowsclub.com/how-to-repair-or-rebuild-the-wmi-repository-on-windows-10
Info: Successfully rebuilt performance counter setting from system backup store
WMI repository is consistent
so it seems WMI repository is fine.
I however uninstalled all instance of SQL Server 2019 what ever I could see in Control Panel program and features.
Again started installing from scratch. I got validation error. While installing SQL server 2019 developer edition this time.
How can this be fixed? I had uninstalled MSSQL server and after a reboot I started a fresh installation.
I now did following
1. Uninstall all SQL Server components you can using Control Panel -> Programs and Features
2. Backup the registry.
3. Delete the following keys in regedit:
--HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
4. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and delete all the sub-keys referencing SQL Server.
5. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and delete all the keys referencing SQL Server.
6. Deleted all the SQL Server folders in the computer C:\Program Files\Microsoft SQL Server and subfolders.
I started a fresh installation. Now I get following errors during installation
Then error 2
and one more error
TITLE: Microsoft SQL Server 2019 Setup
The following error has occurred:
PerfLib 2.0 counter removal failed with exit code 2. Command line: C:\Windows\system32\unlodctr.exe /m:hkengperfctr.xml from directory C:\Program Files\Microsoft SQL Server\150\Shared\.
For help, click: https://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=15.0.2000.5&EvtType=0x590D6427%25400x24BDAA65%25401260%25401
What should I do now?