473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

System DSN Script

I'm wondering if there are any scripting gurus out there that can help with my situation. Here goes...

So I've made this .NET application that manages an engineering firm's drawings, this application allows for data to move from a drawing to a database and vice versa. Now here's the problem, those drawing files are opened with an application that needs to have a DSN set up on it. My idea is that this DSN can be created using a batch file or some vbs script, and the script can be run once the application is installed. Otherwise we will have to go to each and every one of about 700 workstations, and manually set up the DSN there. But as with everthing there's a twist. I know how to create a vbs script to create a DSN, but I don't know how to make it use a standard username and password. We have a SQL login that is to be used, but the only way I've seen to make these DSN scripts uses Integrated Authentication, as opposed to the SQL authentication. Any gurus out there with an idea as to how this can be achieved?
Oct 6 '06 #1
5 16494
do you mean DNS?




I'm wondering if there are any scripting gurus out there that can help with my situation. Here goes...

So I've made this .NET application that manages an engineering firm's drawings, this application allows for data to move from a drawing to a database and vice versa. Now here's the problem, those drawing files are opened with an application that needs to have a DSN set up on it. My idea is that this DSN can be created using a batch file or some vbs script, and the script can be run once the application is installed. Otherwise we will have to go to each and every one of about 700 workstations, and manually set up the DSN there. But as with everthing there's a twist. I know how to create a vbs script to create a DSN, but I don't know how to make it use a standard username and password. We have a SQL login that is to be used, but the only way I've seen to make these DSN scripts uses Integrated Authentication, as opposed to the SQL authentication. Any gurus out there with an idea as to how this can be achieved?
Oct 25 '06 #2
Cyberdyne
627 Expert 512MB
This topic should be moved to the .NET portion of thescripts.com website

Thank you, and yes I am sure there is a script out there for your problem.
Oct 28 '06 #3
NeoPa
32,556 Expert Mod 16PB
do you mean DNS?
No - a DSN is a Data Source Name which allows a connection to a foreign data source for database access generally.
Oct 28 '06 #4
I think you can try this registry technique for adding System DSN

______________________________________________
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI]

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\PROD25]
"DataBase"="PROD25"
"Description"="Connection to PROD25"
"LastUser"="sa"
"Server"="192.168.20.25"
"Driver"="C:\\Windows\\System"

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\PROD26]
"Driver"="C:\\WINDOWS\\system32\\sqlsrv32.dll"
"Description"="PROD26"
"Server"="192.168.20.26"
"Database"="PROD26"
"Language"="us_english"
"LastUser"="sa"

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]
"PROD25"="SQL Server"
"PROD26"="SQL Server"

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC File DSN]
"DefaultDSNDir"="C:\\Program Files\\Common Files\\ODBC\\Data Sources"

___________________________________________

Karthik
http://www.marskarthik.com
Email: marskarthik@marskarthik.com
Oct 31 '06 #5
NeoPa
32,556 Expert Mod 16PB
You will find too many specific items in there for it to work generally I'm afraid.
Most particularly, the IP address of your server.
Oct 31 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Mike Daniel | last post by:
I am attempting to use document.write(pageVar) that displays a new html page within a pop-up window and the popup is failing. Also note that pageVar is a complete HTML page containing other java...
5
by: nephish | last post by:
hey there all, i have been looking for a way to run a php command line script from my python script. here is what i want to do: if x = 4: execute php4 testin.php else: execute php4...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
0
by: Kumar | last post by:
Hi all, I have the following code which uses WebClient.UploadValues myNameValueCollection.Add("Name", name) myNameValueCollection.Add("Age", age) .............. ............. Dim web As New...
6
by: tatamata | last post by:
Hello. How can I run some Python script within C# program? Thanks, Zlatko
0
by: David R. | last post by:
I found a script that converts a regular size image to a thumbnail. It's a wonderful script, except the thumbnail quality is a bit low. I'd like to add the following code to improve the output...
0
by: David R. | last post by:
I found a script that converts a regular size image to a thumbnail. It's a wonderful script, except the thumbnail quality is a bit low. I'd like to add the following code to improve the output...
1
by: David R. | last post by:
I found a script that converts a regular size image to a thumbnail. It's a wonderful script, except the thumbnail quality is a bit low. I'd like to add the following code to improve the output...
2
by: Charlie of Bolton | last post by:
Hello everyone, I want to start a ping on my IP number one, but if this first ip is timing out, I want my script to start automatiquely the check 3 other IP simultanously for comparaison. Of...
1
by: jaywelbourn | last post by:
Hi, I'm trying to use a .net windows application within linux, using WINE, to run a shell script. The reason is that I need to use linux's dd command on a ext2 filesystem that's on an external...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.