title: Repair/Remove/Install processes for SQL Server 2012 Express get stuck or hung
body: <p>An instance of SQL Server 2012 Express became corrupted somehow.<br>
  I suspect it was related in some way to my use of Entity Framework, but have no proof yet.</p>
  
  <p>When trying to <strong>repair</strong> the instance, the repair process seemed to be stuck at the SqlEngineConfigAction_repair_validation_Cpu64 step.<br>
  It was at that step for a long time with no noticeable CPU usage, so I finally cancelled the repair process.  </p>
  
  <p>When trying to <strong>remove</strong> the instance, the uninstall process seemed to hang at the SqlEngineConfigAction_remove_validation_Cpu64 step.</p>
  
  <p>When trying to <strong>install</strong> a 2nd instance, the install process seemed to hang at the SqlEngineDBStartConfigAction_install_configrc_Cpu64 step.  </p>
  
  <p>For some of the attempts, the SQL Server services were <em>not</em> manually stopped beforehand.  For other attempts, the services were manually stopped, and changed from "Automatic" to "Manual".</p>
  
  <p><strong>Symptoms of the database corruption, in case this helps:</strong><br>
  "SQL Server (SQLEXPRESS)" service has a status of "Started" on system reboot, but gets stuck in "Starting" status when the service is manually restarted using the Restart option.</p>
  
  <p>When the service is manually stopped and then started, it displays this error:  </p>
  
  <blockquote>
    <p>Windows could not start the SQL Server (SQLEXPRESS) service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion.</p>
  </blockquote>
  
  <p>SSMS (SQL Server Management Studio) fails to connect to the instance.  It either tries forever with no timeout or error displayed, or it displays this error: </p>
  
  <blockquote>
    <p>A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.)(Microsoft SQL Server, Error: 258)</p>
  </blockquote>
  
  <p>EDIT:
  I'm guessing the down-vote was because this was not stated in the form of a question.  So to clarify, the question is how to resolve the issue of the Repair, Remove, or Install process hanging?</p>
  
  <p>EDIT2: 
  As a followup, it turns out the root cause of the corruption was shutting down the Windows 7 PC without first explicitly stopping the SQL Server services, even though SQL Server Express was not actively being used at the time.</p>
  
  <p>EDIT3: Issue seems to have been resolved in SQL Server 2014 Express.</p>