When trying to use sqlcmd.exe - and not specifying the server and instance name I got the following error:
C:\Program Files\Microsoft SQL Server\90\Tools\Binn>sqlcmd -E -d master
HResult 0x7E, Level 16, State 1
VIA Provider: The specified module could not be found.
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
The solution is to simply specify the server (and instance) name eg:
C:\Program Files\Microsoft SQL Server\90\Tools\Binn>sqlcmd -S localhost\SQLEXPRESS -E -d master