I have created a setup application with SQLEXpress 2008 as a prerequisite. On test SQLExpress installs OK
after the application is installed it must create and install a database using a mixture of SMO and Scripting. I used SMO to add the current user (who is a Windows Administrator) as a Login to the SQL Express server.
Dim l As Login = New Login(srv, My.User.Name)                 l.LoginType = LoginType.WindowsUser                 l.AddToRole("sysadmin")                 l.DefaultDatabase = "MASTER"                 l.Create()
It fails on srv.CreateDatabase with error message "permission ...

Go to the complete details ...