A client called us to install a SQL Server 2008 Express Edition with Advanced Services on a virtual PC running Windows 7. They were stumped on this error message that appeared when trying to run the setup program:
SQL Server has encountered the following error:
Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
I first went to the forums to see if other people had encountered this problem. One promising post listed several suggestions related to closing all other windows and making sure the installer window always had the focus, and these suggestions apparently had helped several people. I tried all of them and the problem persisted.
Another post recommended to first install the appropriate .NET framework. This did not work either.
I also read that this was an old bug that Microsoft had already fixed. But not for our case, it seemed.
Well, I was getting nowhere so I decided to look at the Event Viewer for clues. And there it was (paraphrasing):
Windows does not like to execute programs from the C:\Temp folder.
I had not realized the server administrator had downloaded the setup file to the Temp folder. So we copied the setup file to another folder and it worked.