about custom installer

T

Tony Johansson

Hi!

A question just for understanding custom installer.
I now that VS has setup project that can help with the installation.
What does this sentence mean:
"There are many way to invoke your installers for example, by using the
InstallUtil.exe utility.
The Installer class has an Installers property, which returns an instance of
the InstallerCollection
This property is useful because it allows you to add multiple installers to
a single assembly so that different isolated tasks can be run."

My answer is that you can for example have several CustomInstallers in the
same assembly if I understood the text correct like below. Is that correct ?
But if you now can have several custom installers in the same assembly which
install method is called becuase you might have one install method in each
custom installer ?

public class CustomInstaller_1 : Installer
{
....
}

public class CustomInstaller_2 : Installer
{
....
}

//Tony
 
W

Wilson, Phil

You may have to quote where that documentation came from to help me see the
context. InstallUtil isn't the same as a setup project that builds an MSI
file. A setup project custom action for an installer class declares a
custom action in an assembly, so an install custom action calls the Install
method of one installer class, so I think you're right, but there's no
reason that Install method can't call any other methods it wants in the same
assembly. I think InstallUtil.exe behaves differently - I can't be bothered
to look up the docs but it isn't constrained by custom action architecture,
and so can reflect over an entire assembly and call every install method it
finds in installer classes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top