
Signature
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280
Hi,
Well I want to have just one copy of dll in order to do a logging.
Here what I am doing. In my example a.ll is notging but a component
which does the loggin into a file. Now this component requires a config
file which specifies the location of log file.
Now in code I am accessing the config file with a relative path and the
log file location specified in the the config file is also a relative
path. so that each application will write a log in the location which
remains same all the time.
Why I am doing this, simpley to avoid changing this file for each site
location as I am not sure the drive in which this is going to get it
install.
What I really want is that when I install at every site, all my dll
should go in <drive><some folder>/bin and all exe should go in
<drive><some folder>/exe. When exe runs it should load the dll from the
dll directory so I don't have to keep the dll in exe folder. isn' t it
right.
Pls suggest if I am doing wrong thing..
> What you've done is pretty straightforward - you've created two completely
> separate apps and installed them in their own app folders with their
[quoted text clipped - 39 lines]
> >
> > pb.
Phil Wilson - 13 Jul 2006 16:35 GMT
Your application won't work if the exe is in some folder and all the
dependent assemblies are in a completely separate folder that isn't a
subfolder. Assuming you have an executable and some assemblies, you need to
understand that your app works only because they are all in the same folder.
Also, I can't figure out how you can make your design work. You have two
setups, both with a.dll, so both will install a config file for the logging
that you want to go into one location. Does one replace the other if app2 is
installed after app1 has changed the config file? What happens if one app is
uninstalled? (It will most likely uninstall the config file).
If you have two separate apps (you have two setups) surely they need their
own logging, not logging from one app mixed in with logging from the other?
My inclination would be for each app to have its own config file and the
logging Dll so that each logs to an app-specific location. If you uninstall
one app. the other keeps its logging Dll and its config file and still
works.
The other alternative that's quite common is simply not to give the user a
choice. There's often no reason to ask the user to tweak where a log file
goes when there are perfectly fine default locations, such as somewhere in
Documents&Settings (Environment.SpecialFolder.CommonApplicationData + your
product name, as an example). --
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280
> Hi,
>
[quoted text clipped - 69 lines]
>> >
>> > pb.