Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How To Install An Odbc System Dsn

Featured Replies

I use a vbscript to add the DSN entries as part of the application install for our database application. You could use the same thing during unattend setup, or use .reg keys to achieve the same thing.

WSH SCRIPT FOR CREATING DSN ENTRIES IN FOR ODBC.

'ARRAY OF SETTINGS FOR EACH DSN ENTRY.
'EACH ELEMENT OF DSNLIST IS AN ARRAY OF SETTINGS FOR THAT DSN.
Dim DSNLIST (4)    
'CONSTANTS FOR REFERENCING THE DSN SETTINGS FROM THE DSNLIST ARRAY
Const DSNname    = 0
Const DSNdesc = 1
Const DSNServer = 2
Const DSN_DB = 3
'THE REGISTRY KEY FOR THE SYSTEM DSN SETTINGS
Const DSNkey = "HKLM\SOFTWARE\ODBC\ODBC.INI"

'POPULATE DSNLIST WITH DSN SETTINGS. TO ADD TO LIST, REMEMBER TO CHANGE THE DIM, AND FOR LOOP

DSNLIST(0) = Array("DSN name", "description", "Server", "database")
DSNLIST(1) = Array("DSN name", "description", "Server", "database")
DSNLIST(2) = Array("DSN name", "description", "Server", "database")
DSNLIST(3) = Array("DSN name", "description", "Server", "database")


'USE WSH TO WRITE DSN SETTINGS TO REGISTRY
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set WshShell = WScript.CreateObject("WScript.Shell")

'The following loop populates the DSN entries into the registry
For db = 0 to 3
WshShell.RegWrite DSNkey &"\" & DSNLIST(db) (DSNname) & "\Database", DSNLIST(db) (DSN_DB), "REG_SZ"
WshShell.RegWrite DSNkey &"\" & DSNLIST(db) (DSNname) & "\Description", DSNLIST(db) (DSNdesc), "REG_SZ"
'Next line turns off the ANSI padding
WshShell.RegWrite DSNkey &"\" & DSNLIST(db) (DSNname) & "\AnsiNPW", "No", "REG_SZ"
WshShell.RegWrite DSNkey &"\" & DSNLIST(db) (DSNname) & "\Driver", "C:\Windows\System32\SQLSRV32.dll", "REG_SZ"
WshShell.RegWrite DSNkey &"\" & DSNLIST(db) (DSNname) & "\Server", DSNLIST(db) (DSNServer), "REG_SZ"

'THE FOLLOWING REGISTRY KEY POPULATES THE ENTRY INTO THE ODBC CONTROL PANEL APPLET
WshShell.RegWrite DSNkey &"\ODBC Data Sources\" & DSNLIST(db) (DSNName), "SQL Server", "REG_SZ"

'UNCOMMENT WSCRIPT.ECHO TO DISPLAY ENTRIES AS THEY ARE WRITTEN (PROMPTS FOR OK).
'Wscript.Echo db, DSNLIST(db) (DSNname)
Next
Set WshSHell = Nothing

Just change the items in the arrays to match what your actual DSN settings are. If you need to add or change other settings, I would suggest making the settings manually and then inspecting the registry.

Set up your ODBC entries, then export the registry entries from HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI

And to force SQL Server ODBC to use TCP/IP port 1433 export relevant entries from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer

Just curious, but have you tried this Telenut? as i would like to use but am a little wary of doing so.

  • Author

Nope, still have to test it. (I don't use it at home, it is just for testing at work. I'm trying to create a good working unattended installation over network before I suggest the idea to the 'boss'. They are verry, old fashioned here :s, It has to be perfect before they even consider looking at it. And zo I do al the testing after working hours too...)

edit: Boss went home this noon :-)

It works by just exporting the reg key, and then import it again. Have not tried the other script

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.