Solved

Creating a system DNS for Installshieldx

Posted on 2004-10-06
5
260 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 56

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 56

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 56

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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
A short article about problems I had with the new location API and permissions in Marshmallow
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

749 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