Re: Making changes to the registry during setup
From: Q (Q_at_nomail.be)
Date: 01/08/05
- Next message: Alex: "Problem creating first project with VS 2003 - IIS not using NET 1.1 Error"
- Previous message: lilharm15: "Re: shell.dll not found"
- In reply to: Phil Wilson: "Re: Making changes to the registry during setup"
- Next in thread: Phil Wilson: "Re: Making changes to the registry during setup"
- Reply: Phil Wilson: "Re: Making changes to the registry during setup"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 8 Jan 2005 21:28:11 +0100
Phil,
this is exactly what I needed.
Thanks a lot.
By the way. Is there a list available of all the 'variables' (--> like
[TARGETDIR]) that you can use in the setup?
Regards,
Q
"Phil Wilson" <pdjwilson@nospam.cox.net> wrote in message
news:%236ninCb9EHA.3368@TK2MSFTNGP10.phx.gbl...
> I think your registry item in the setup project just needs to be name of
DBQ
> and a value of:
>
> [TARGETDIR]mydatabase.mdb
>
> assuming the database is being installed to the Application Folder.
> --
> Phil Wilson
> [Microsoft MVP-Windows Installer]
> Definitive Guide to Windows Installer
> http://apress.com/book/bookDisplay.html?bID=280
>
> "Q" <Q@nomail.be> wrote in message
> news:OHwwpFZ9EHA.3708@TK2MSFTNGP14.phx.gbl...
> > Hello all,
> >
> > I already posted this problem in another newsgroup a few days ago but I
> > did
> > not get a real answer to my problem.
> > So please don't be mad about me crossposting this problem.
> >
> > Let me describe the problem:
> >
> > In my application, I use an access database. To make the connection to
the
> > database, I use ODBC-connection with the
> > following connection string: DSN=MyDataSource. (MyDataSource is a system
> > datasource that's pointing to the database
> > which is located in a Database-folder in the application folder)
> >
> > If I want to distribute the application, I have to provide the 'target'
> > system with the correct datasource. I could do this by creating an entry
> > in the registry with the setup of the application. The entry in the
> > registry
> > would look something like the lines below.
> > The problem is the following line:
> > DBQ=C:\\Myapplication\\Database\\mydatabase.mdb.
> > I have to be able to change this line to the installation folder that
the
> > user has chosen during setup, otherwise, the application will never find
> > the database because the datasource is pointing to a bad location!!!!
> >
> > I'm sure the solution is very simple. I just don't see it!
> >
> > Can anyone help me out here?
> >
> > Thanks in advance,
> >
> > Q
> >
> > Example of Registry Entry
> >
> > [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\MyDataSource]
> > "Driver"="C:\\WINDOWS\\System32\\odbcjt32.dll"
> > "DBQ"="C:\\MyApplication\\DataBase\\MyDatabase.mdb"
> > "DriverId"=dword:00000019
> > "FIL"="MS Access;"
> > "SafeTransactions"=dword:00000000
> > "UID"=""
> >
> > [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\MyDataSource\Engines]
> >
> > [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\MyDataSource\Engines\Jet]
> > "ImplicitCommitSync"=""
> > "MaxBufferSize"=dword:00000800
> > "PageTimeout"=dword:00000005
> > "Threads"=dword:00000003
> > "UserCommitSync"="Yes"
> >
> >
>
>
- Next message: Alex: "Problem creating first project with VS 2003 - IIS not using NET 1.1 Error"
- Previous message: lilharm15: "Re: shell.dll not found"
- In reply to: Phil Wilson: "Re: Making changes to the registry during setup"
- Next in thread: Phil Wilson: "Re: Making changes to the registry during setup"
- Reply: Phil Wilson: "Re: Making changes to the registry during setup"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|