João Maia
5/7/2008 2:12:00 PM
Hi there,
I am currently developing a web setup project using .net framework
2.0. I am using custom actions, and overriding the Install and
Uninstall methods, yet there's one thing I don't get and maybe you can
give me a hand: what exactly is the flow of the setup project ? At
what time are the entry points for Install called ?
To be a bit more specific, let's say my setup project has some files
it needs to put on the deployment machine (I set these on the File
System tab of the setup project), has to create a web application on
the deployment machine, and makes use of the Install method of a
custom action that I created to to some additional stuff. What I need
to know is exactly when is the install method executed ?
Is it executed after the other actions, as in:
1 - copy files to deployment machine
2 - create web application on deployment machine
3 - call install method on my custom action
Or is it executed first ?
1 - call install method on my custom action
2 - copy files to deployment machine
3 - create web application on deployment machine
Or does it depend on where I have a call to base.Install(savedState)
on my custom action's Install method ? For example, if my method is:
public override void Install(System.Collections.IDictionary
savedState)
{
// do some stuff
base.Install(savedState);~
// do some more stuff
}
Does this mean that the flow is something like:
1 - Do some stuff on Installl method
2 - copy files to deployment machine
3 - create web application on deployment machine
4 - Do some more stuff on Install method
The reason I'm asking this is because I may need to do some things
before the actual installation is started, like for example, put a few
more files on the File System to be copied to the destination machine
than those that were originally put in the setup project, and I would
like to know exactly where I can add the code to do something like
this. I also noticed a few events on the Installer class (that my
custom action inherits from) like BeforeInstall and AfterInstall, but
haven't managed to find out how to use these events.
Can anyone give me a hand here ?
Thanks,
Joao Maia