Hello.
I'm trying to create a setup project and .msi file for my addin. I want
the addin installed to <program files>\<Company
name>\<product>\My_addin.dll. I want the .addin file to go to <All
users' Doc & Settings>\My Documents\Visual Studio
2005\Addins\My_addin.addin.
So far so good.
However, on install, the .addin file has to be modified so that this
element
<Assembly><ProgramFiles>\<Company
Name>\<product>\my_Addin.dll</Assembly>
<CompanyName> and <product> are easy, but <Program Files> is
dependent on the user doing the install. Any ideas on how to
programmatically tweak this at install time?
thanks, J
Hi,
Typically the user can change the installation folder, so you can't rely on
the pattern "<ProgramFiles>\<Company Name>\<product>" that you suggest to
him/her. The installer should tell you the actual installation folder
selected by the user in a variable or something like that (I'm sorry that I
don't know the details of this), and you can use it in a custom MSI action
to modify the .addin file.

Signature
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
> Hello.
>
[quoted text clipped - 17 lines]
>
> thanks, J
JimGraham - 21 Jun 2006 16:00 GMT
Hi
Thanks for the response. Can you point me to an example of a custom
msi action and how to call it from the setup project? I'm a complete
newbie to this stuff.
thanks, J
> Hi,
>
[quoted text clipped - 36 lines]
> >
> > thanks, J
Peter Macej - 22 Jun 2006 09:19 GMT
Custom action can work in several ways. You can write a script or a .NET
class inherited from System.Configuration.Install.Installer. Don't
forget to handle unregistering on uninstall. Just implement Install and
Uninstall methods. See http://tinyurl.com/jt79h
You can include this class into your addin DLL or into separate DLL.
In your case you need to pass actual install folder. Set
CustomActionData to /myActualPath="[TARGETDIR]/" in custom action
properties. Then you can read this parameter in your custom action
(Install method) by:
Me.Context.Parameters.Item("myActualPath")

Signature
Peter Macej
Helixoft - http://www.vbdocman.com
VBdocman - Automatic generator of technical documentation for VB, VB
.NET and ASP .NET code