Solved

Creating a system DNS for Installshieldx

Posted on 2004-10-06
5
262 Views
Last Modified: 2010-04-17
I am trying to create a system DNS for Installshieldx under the ODBC section.  Do you have any tips on this?  Thanks.
0
Comment
Question by:roggerom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 57

Expert Comment

by:Julian Hansen
ID: 12241069
Create a registry entry. ODBC DSN's work entirely off registry settings

System = HKEY_LOCAL_MACHINE : User = HKEY_CURRENT_USER

Key:
\Software\ODBC\ODBC.INI\NameOfDSN

Values: These differ by driver but you can create one manually and then just copy for your needs

ALSO:
Under the key

\Software\ODBC\ODBC.INI\ODBC Data Sources
Put a REG_SZ value named NameOfDSN set to the name of the driver to use Example

\Software\ODBC\ODBC.INI\ODBC Data Sources
MyDSN: REG_SZ: SQL Server

Again you can look at the registry for an idea on what values to use.

HTH
0
 

Author Comment

by:roggerom
ID: 12261539
Thank you very much.  I tried that but when I went to test my install I got:

Error 1919. Error configuring ODBC data source.  

This install is for a client machine which will need a silent install.  Here are the requierments from my developer:

Module: Physician Record.exe
Default Location: C:\Program Files\DST\ADDRREP
Dependencies:  Requires VB Runtime modules
                                Requires an ADDRREP System DSN pointed to the Physician Requestor database (SQL DB)
                                ID and Password to access the DSN are stored in the registry:
                                     HKEY_CURRENT_USER\Softwar\DST\AWD\PhysReqDB ->"dbUser" (default value is "awdbi")
                                     HKEY_CURRENT_USER\Softwar\DST\AWD\PhysReqDB ->"dbPass" (default value is "awdbi")
-------
I have built a custom dialog screen with four text screens to capture the Defaulted userID and password.  This is a silent install which will be pushed to a client machine upon log on.  I don't know what the server or database name will be so how do create an install for that can be modified or configured by a system admininstrator before it is pushed across the domain to users.  Thanks
0
 
LVL 57

Expert Comment

by:Julian Hansen
ID: 12266014
BTW I think you mean DSN rather than DNS ... ;)

The easiest way to do this is to create the DSN with the Data Sources control panel applet and then look in the registry for the exact keys that must be created and copy thse.

I don't think you can include a password for ODBC DSN's - for security reasons this would not be a good idea. The password you enter when setting up the connection is only for accessing the database to determine which tables are available etc and is not actually stored in the database. When your application uses the DSN it must supply the name and password as part of the connect i.e.

conn.ConnectionString = "DSN=ADDRREP;UID=sa;PWD=password" or similar

The flip side of this is if you use integrated security - this would be enabled if you chose the Windows Security option in the ODBC wizard and in the registry the Value Trusted_Connection would be created set to "Yes".

Your best option would be to create an NT Group and give this group access to the database objects your app needs access to. Users that then use the app should be added to the NT User group. In this way you won't have to worry about user ID and password. If you don't do it this way you will either have to hard code the UID and PASS into the APP or the user will have to enter a name and password for connecting to the database.

To answer your last question your silent install would have to ask for Server and Database and with these values, using the registry template you saved in the process described above, you create the DSN entries in the registry.
0
 
LVL 57

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 12266021
Just as a matter of interest I used this method for all the AWD installation scripts I did - to both SQL server and DB2 on AS/400
0
 

Author Comment

by:roggerom
ID: 13558365
sorry, I just never was able to complete this.  I can consider it closed.  Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Progress
Starting up a Project

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question