473,549 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System DSN Script

30 New Member
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 16500
welchja
2 New Member
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 Recognized Expert Contributor
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,564 Recognized Expert Moderator MVP
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
marskarthik
1 New Member
I think you can try this registry technique for adding System DSN

_______________ _______________ _______________ _
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACH INE\SOFTWARE\OD BC\ODBC.INI]

[HKEY_LOCAL_MACH INE\SOFTWARE\OD BC\ODBC.INI\PRO D25]
"DataBase"="PRO D25"
"Description"=" Connection to PROD25"
"LastUser"= "sa"
"Server"="192.1 68.20.25"
"Driver"="C:\\W indows\\System"

[HKEY_LOCAL_MACH INE\SOFTWARE\OD BC\ODBC.INI\PRO D26]
"Driver"="C:\\W INDOWS\\system3 2\\sqlsrv32.dll "
"Description"=" PROD26"
"Server"="192.1 68.20.26"
"Database"="PRO D26"
"Language"="us_ english"
"LastUser"= "sa"

[HKEY_LOCAL_MACH INE\SOFTWARE\OD BC\ODBC.INI\ODB C Data Sources]
"PROD25"="S QL Server"
"PROD26"="S QL Server"

[HKEY_LOCAL_MACH INE\SOFTWARE\OD BC\ODBC.INI\ODB C File DSN]
"DefaultDSNDir" ="C:\\Progra m Files\\Common Files\\ODBC\\Da ta Sources"

_______________ _______________ _____________

Karthik
http://www.marskarthik .com
Email: marskarthik@mar skarthik.com
Oct 31 '06 #5
NeoPa
32,564 Recognized Expert Moderator MVP
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
12964
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 scripts. Being a javascript newbie and after significant testing, I suspect that the document.write fails after finding a </script> within pageVar....
5
1977
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 testout.php
0
3208
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 converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. ...
0
4056
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 System.Net.WebClient web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
6
9900
by: tatamata | last post by:
Hello. How can I run some Python script within C# program? Thanks, Zlatko
0
1149
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 quality of the thumbnail. Can someone direct me where to incorporate this code? Thanks. Code to insert: graphic.InterpolationMode =...
0
1284
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 quality of the thumbnail. Can someone direct me where to incorporate this code? Thanks. Code to insert: graphic.InterpolationMode =...
1
1584
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 quality of the thumbnail. Can someone direct me where to incorporate this code? Thanks. Code to insert: graphic.InterpolationMode =...
2
1657
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 course I want the result of the packet lost % to be shown for each of my IPs and that timed out time. What will be your best guest to built such a...
1
2029
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 drive, and .net doesn't seem to support this, and I don't want to rewrite my entire application for linux just to use this command. Should...
0
7532
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7730
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7971
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7491
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7823
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5101
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3509
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.