The main reasons behind this problem is a corruption in the registry key which holds the value of the files which are executed while login to windows. This registry key can get either replaced with some incorrect value or it might get corrupt due to some virus / trojan activity. Lets see how to fix this issue.
We need to remotely access the infected computer from another computer on same network. Then we need to correct the registry key for userinit under winlogon.
Lets see the steps one by one:
1. Connect the infected computer to a network which has at least one healthy computer connected. Power on both of the computers.
2. From the healthy computer, Go to Start > Run, type regedit.exe and press enter. This will launch the registry editor.
3. Go to File > Connect Network Registry, by using this infected computer's name or IP address.
4. Locate this entry
5. At this entry there is a key names userinit, double click on the key and set its value to "C:\WINDOWS\System32\userinit.exe,"
Exit the registry editor, restart the infected computer. This is it. This will work for most of the computers.