If you look at the script you will find some lines that look like:
sServer = "(local)"
sDatabase= "pubs"
That means that as a sample it makes the assumption that the sever is installed local as opposed to using a named instance like yours. It also means that it is using the default database called pubs.
If you wish to use a named instance, you have to change the line that says sServer = "(local)" to something like sServer = "D-XXXXX\SS_INST1"
That would work fine if in fact you were able to get in using windows security instead of having to use a username and password such as 'sa' .
If you want to use a username and password you will need to change the lines (in several places) that look like:
with oSS
.LoginSecure = True
.Connect sServer
end with
To look like:
with oSS
.LoginSecure = False
.Connect sServer
.Password "YourPassword"
.Login = "YourLoginname"
end with
Where "YourPassword" is the password you are wanting to use and "YourLoginName" is the name you want to use such as "sa" or whatever. Of course you could certainly place variables into that such as:
with oSS
.LoginSecure = False
.Connect sServer
.Password sPassword
.Login = sLoginName
end with
Then change main to include them:
sServer = "(local)"
sDatabase= "pubs"
sPassword= "YourPassword"
sLoginName= "YourLoginName"
Then change the procedure calls to include them:
ScriptDefaultsUsersRolesAndLogins sServer, sDatabase, sPassword, sLoginname
ScriptEverythingElse sServer, sDatabase, sPassword, sLoginname
ScriptViews sServer, sDatabase, sPassword, sLoginname
And their corresponding procedure definitions:
Sub ScriptEverythingElse(sServer, sDatabase, sPassword, sLoginname)
and so forth...
I hope this helps.
-- Bradley