Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / June 2006

Tip: Looking for answers? Try searching our database.

Setup project and .addin file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JimGraham - 20 Jun 2006 15:46 GMT
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
Carlos J. Quintero [VB MVP] - 21 Jun 2006 09:49 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.