Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 14th, 2006, 02:25 PM
Registered User
 
Join Date: Oct 2006
Location: tcr, kerala, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default help please

Hi,

I have created a program which uses access as the database. I wish to give it to my friends, but some of them are not much aware of windows administration.

Can i create a .bat file which can add the DSN for my database

Thanks in advance,

Alfahed p m
Reply With Quote
  #2 (permalink)  
Old October 17th, 2006, 02:21 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You need to create a .vbs script that will create the DSN.

Here is one for a SQL Server to get you started.

Uninstall your current DSN, then install it and note the changes, and document them.

You could also use a DSN-less provider statement so you wan't have to do this.

Let me know if you need additional help.

'------------------
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKLM\Software\ODBC\ODBC.INI\AssetManagement\Descr iption", "SQL"
WshShell.RegWrite "HKLM\Software\ODBC\ODBC.INI\AssetManagement\Drive r", "C:\Windows\System32\\SQLSRV32.dll"
WshShell.RegWrite "HKLM\Software\ODBC\ODBC.INI\AssetManagement\LastU ser", "Unknown"
WshShell.RegWrite "HKLM\Software\ODBC\ODBC.INI\AssetManagement\Serve r", "SQLDatabaseName"
WshShell.RegWrite "HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\AssetManagement", "SQL Server"
'----------------------------------------

mmcdonal
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off




All times are GMT -4. The time now is 06:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.