Setting up an ODBC source with a username with Wise Package Studio 8

tommyrytkonen used Ask the Experts™
Hi experts!

I'm trying to set up an ODBC source with the ODBC tab in the Windows Installer Editor (I captured an MSI and are editing the MST file.

I can naturally add the ODBC source ok with the correct DSN, but is there a way to set up the username and possibly the password? The username itself will do at this stage.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The tables in MSI database don't support storing odbc username and password, because those parameters are provider-specific. The idea is that the application will provide them as part of the odbc connection string: DSN=... PWD=....

For sql server, you still can put username by injecting it into the registry as

HKCU\Software\ODBC\ODBC.INI\<your-odbc-name>\LastUser (or HKLM\... if machine data source). I would also move in the script WriteRegistryValues after InstallODBC .

Generally, if some odbc provider allows storing username and password (or anything else), you need to figure out where (most likely in the registry), and put in the MSI by non-ODBC means.


I tried just about everything, besides the run-order of the scripts. I did, as you mentioned, , tried injecting the username in the registry, but always got an error and now I know why!

I moved the WriteRegistryValues beneath InstallODBC and it worked like a charm! Thanks a million! :-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial