Home All Groups Group Topic Archive Search About

.Net Framework Installer Class

Author
11 Apr 2005 8:36 PM
Mark Assousa
Hi,

I'm having trouble finding the right news group for this posting so here
goes...

I am attempting to execute some special actions within an installation
project for a standard .Net Windows application. I have a custom
Installer class that needs to access a disk file installed during the
installation in a directory relative to the application directory. The
file name is known but I don't know how to access the target
installation folder during the AfterInstall event of the Installer
class. I'm certain this information is available, I just don't know
where it is. Any suggestions?

On a related note, I'm a little fuzzy on the linkage between an
installer class library and the install project itself. It appears you
do not explicitly instantiate the custom installer in code but reference
  the class name under a special action and the special action uses
Reflection to locate and instantiate an instance of the class at
install/uninstall time. Is that correct?

Thanks in advance.

Author
12 Apr 2005 7:59 AM
Jan Hyde
Mark Assousa <masso***@netscape.net>'s wild thoughts were
released on Mon, 11 Apr 2005 15:36:44 -0500 bearing the
following fruit:

>Hi,
>
>I'm having trouble finding the right news group for this posting so here
>goes...

..VB = VB Classic Groups

..dotnet = .Net groups.

It's rare that you would need to post to both


Jan Hyde (VB MVP)

--
Birds are grouchy in the morning because their bills are over dew.
(Pun of the Day)

[Abolish the TV Licence - http://www.tvlicensing.biz/]
Author
14 Apr 2005 2:40 PM
Phil Wilson
Pass TARGETDIR into your custom action CustomActionData like this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxgrfcustomactiondataproperty.asp

You get it from the IDictionary item associated with name if you used /name.

You should just pass it into the Install custom action. There's no practical
difference between Install and AfterInstall, even though the names imply
that one is at the beginning and one at the end.

Visual Studio adds a shim Dll to your setup. Windows Installer calls this in
a standard custom action way (as in the WI SDK) and the shim Dll then finds
your assembly, uses reflection etc as you say.

--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

Show quoteHide quote
"Mark Assousa" <masso***@netscape.net> wrote in message
news:uclwrYtPFHA.3596@TK2MSFTNGP15.phx.gbl...
> Hi,
>
> I'm having trouble finding the right news group for this posting so here
> goes...
>
> I am attempting to execute some special actions within an installation
> project for a standard .Net Windows application. I have a custom Installer
> class that needs to access a disk file installed during the installation
> in a directory relative to the application directory. The file name is
> known but I don't know how to access the target installation folder during
> the AfterInstall event of the Installer class. I'm certain this
> information is available, I just don't know where it is. Any suggestions?
>
> On a related note, I'm a little fuzzy on the linkage between an installer
> class library and the install project itself. It appears you do not
> explicitly instantiate the custom installer in code but reference the
> class name under a special action and the special action uses Reflection
> to locate and instantiate an instance of the class at install/uninstall
> time. Is that correct?
>
> Thanks in advance.
Author
15 Apr 2005 5:22 PM
Mark Assousa
In a scant hundred years, I'm certain I would have found that. Thanks
for saving me a lot of time.

Phil Wilson wrote:

Show quoteHide quote
> Pass TARGETDIR into your custom action CustomActionData like this:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxgrfcustomactiondataproperty.asp
>
> You get it from the IDictionary item associated with name if you used /name.
>
> You should just pass it into the Install custom action. There's no practical
> difference between Install and AfterInstall, even though the names imply
> that one is at the beginning and one at the end.
>
> Visual Studio adds a shim Dll to your setup. Windows Installer calls this in
> a standard custom action way (as in the WI SDK) and the shim Dll then finds
> your assembly, uses reflection etc as you say.
>