I actually have two parts to this question. Is there any way to have the MSI recognize all SQL Server or MSDE databases that are installed on a certain server and to allow the user to create a login account for them during setup?

I am building a web application that will need rights to a database that already exists before it can run. I want the MSI to begin running and then ask the user to select a DB. Then I need the user to be able to specify a username and password to create for access to that database.

Any help would be appreciated.

I am using WISE Package Studio 5.1
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


Hi Grim:

First of all the answer to your first question:

1. you could create a wise script and execute the query
select name from sysdatabase
this would return all the databases attached to the SQL/MSDE
You could then store these results in a variable or/and then transfer the output to a text file.

2. to allow user to create a login

you again run a SQL script that is grant permission (please read about this on the net since I have forgotten SQL).
using wise script editor it would be easy to do all the above tasks. However should you still require help in doing so please get in touch with me.
Answered 09/14/2005 by: wiseapp
Second Degree Green Belt

Please log in to comment
Thank you for the response. I figured I would have to create some SQL scripts inside the MSI in order for this to happen. I will look elsewhere to find out how to create an account in transact SQL.

The only sticking point on this is that the SQL inside the Wisescripts would need admin access to the database to read from the sys tables or to create accounts. I will probably run the SQL under the windows login account hoping that it will have sufficient privileges to the server's databases.
Answered 09/14/2005 by: grimmeissen
Senior Yellow Belt

Please log in to comment
Hi Grim:

Well if you are using the new MSDE engine that with sp3 then you could probably use this command to give the user admin access:

osql -E
> Select name from sysdatabase

Master DB so on and so forth

if you give osql -E it takes the current logged in user security account and logs him as the admin. Try it.
Answered 09/15/2005 by: wiseapp
Second Degree Green Belt

Please log in to comment