Re: Making changes to the registry during setup

From: Q (Q_at_nomail.be)
Date: 01/08/05


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"
> >
> >
>
>



Relevant Pages

  • RE: Repost - Unable to run Outlook 2000 com addin built via .NET/V
    ... I checked the addin and the registry setup in the VS project didn't contain ... although it did have an entry for (I presume because I configured the addin, ... I added the HKLM entry to the registry settings and rebuilt. ...
    (microsoft.public.dotnet.framework)
  • Re: Making changes to the registry during setup
    ... I think your registry item in the setup project just needs to be name of DBQ ... assuming the database is being installed to the Application Folder. ... Definitive Guide to Windows Installer ...
    (microsoft.public.vstudio.general)
  • Making changes to the registry during setup
    ... I use an access database. ... system with the correct datasource. ... I could do this by creating an entry ... in the registry with the setup of the application. ...
    (microsoft.public.vstudio.general)
  • Re: I cant reinstall IE
    ... "Terry" wrote: ... Setup cannot continue. ... I am not too good at modifying my registry, ... I should find an entry called IsInstalled and change the value from a 1 ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Registry entries, Licence Page in VS 2003 Setup Project
    ... have created a Setup Project using Visual Studio .NET 2003. ... deleting that entry during uninstall. ... Yes, in the installer project, you can select the registry options for ...
    (microsoft.public.dotnet.framework)