update a config file with a form at deployment time?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi all,

I have created a little service that works with a config file that obviously
has to be right before the service starts. To make it easier for people
trying to set up the config file properly I have create a simple windows form
that will modify (not create) the config fiile with the right info so the
service can work fine.

I found a few things on how to customise the installer etc... Best thing I
found was to actually load an application using the Custom Actions right at
the end of the installation before the last screen of the installer is even
displayed.

So I've done a few tests which work, but in the case of my service it isn't
quite working. This is how it is set up:
I have the solution with 3 projects, the service itself, the windows form
application to modify the xml config file, and the setup project. I've added
my project output to the install node of the Custom Actions and it does try
to load my application, but since the application checks if the file exists
first it doesn't load.

So I was wondering, the msdn library actually says all the actions under the
install node are executed once all the files have been installed, but when my
application loads at the end of the installation it doesn't seem to find the
file... Does it load from the folder it's supposed to be installed in? Or
from somewhere in the memory where obviously the file cannot be found?

Would there be any alternative? I do want to load that application so people
configure the service straight away because the info held in the config file
are just values used to make an SQL query string.

Thanks!

Regards,

Seb
.



Relevant Pages

  • Re: update a config file with a form at deployment time?
    ... > the installation folder into your custom action, ... > Phil Wilson [MVP Windows Installer] ... >> trying to set up the config file properly I have create a simple windows ... >> found was to actually load an application using the Custom Actions right ...
    (microsoft.public.dotnet.framework.setup)
  • Re: Click once and exe.config file
    ... The user will actually need to be able to edit the config file ... re-installs their product to acquire the new settings. ... Set up the custom installer as a wizard and ask ...
    (microsoft.public.dotnet.framework)
  • RE: Write to config file from deployment project
    ... collected by the installer from a UserInterfaceTextBox page using all four ... I have a ProjectInstaller class in which I override the Install method call ... Without the custom action and using installutil directly on the windows ... > It shows how to load the .config file and use XML to change values. ...
    (microsoft.public.dotnet.framework)
  • Re: DLL.config files and MSI Deployment Projects
    ... Folder, Common Files, the GAC etc. ... Windows service has a config file which I have made a custom configuration ... The problem is the installer isn't grabbing the dll.config file ...
    (microsoft.public.dotnet.general)
  • Re: update a config file with a form at deployment time?
    ... the application is running from and therefore where my config file is stored. ... > is running on top of the Windows Installer service, ... > the installation folder into your custom action, ... >> found was to actually load an application using the Custom Actions right ...
    (microsoft.public.dotnet.framework.setup)