RE: VS Setup project: detect install folder automatically?
- From: Ben R. <benr@xxxxxxxxxxxxxxxx>
- Date: Fri, 4 Aug 2006 06:07:02 -0700
Hi Steven,
You were right! There was a key in the registry that pointed to the install
path so I could use that value and specify an install folder which was a
subfolder of the path in the registry.
Thanks!
-Ben
"Steven Cheng[MSFT]" wrote:
Hello Ben,.
From your description, you're developing an setup program for a VB.NET
winform program through the Visual Studio setup project. Currently you're
wondering how to copy some component/files into a destination directory and
the directory path is depend on an existing installed program(some certain
file) on the target machine,correct?
Based on my research, we have the following available approaches for such
scenario:
1. Since you will install those custom components(addin ...) into another
program's installation location, is that location available in the target
machine's registry. Most applications will store their installation root
path or any add-in storage path in the registry, if this is the case in
your scenario, you can consider use the "Registry Launch Condition" with a
Custom Folder that reference the detected registry value in the "Registry
Launch Condition" to do the task. Here is a MSDN article that demonstate
this approach:
#How to: Use a Registry Launch Condition to Specify a Target Directory
http://msdn2.microsoft.com/en-us/library/h0z89y5d.aspx
2. If #1 doesn't work for your case(the path isn't simply available through
a single registry value), we may need to use "File launch condition"
together with Custom Action to perform the work. Following is the complete
steps to do it:
1) use "File launch condition" and "Search file on target machine" to get
the directory path(we specify a proper Property name for the search which
will be referenced later in custom action).
2)Create a custom action assembly(with a Installer class), the installer
class will use the path passed from the previous action(search file on
target machine). And our custom components(which will be copied) can be put
in the same directory with custom action assembly so that we can easily
reference it in custom action class(see my test installer class).
3)Add the custom action (through the assembly, you can create it in a
standard class library project) into setup project, and set any necessary
parameter that need to pass into custom action through the
"CustomActionData" property. (see my attached image files)
To make it clearer, I've attached two screenshots about the "file launch
condition" and "custom action" setting and my test custom action class in
this message.(I test through Visual Studio 2005). You can get it if you're
using Outlook express to visit the NNTP newsgroup. Please let me know if
you have difficulty access the files.
In addition, here are some good articles and reference about using Custom
Action in VS setup project.
#A Custom Action for Deploying Visual Studio 2005 Add-in
http://www.codeproject.com/useritems/AddinCustomAction.asp
#Walkthrough: Creating a Custom Action
http://msdn2.microsoft.com/en-us/library/d9k65z2d.aspx
If you have anything unclear or any further questions on this, please feel
free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial
response from the community or a Microsoft Support Engineer within 1
business day is
acceptable. Please note that each follow up response may take approximately
2 business days
as the support professional working with you may need further investigation
to reach the
most efficient resolution. The offering is not appropriate for situations
that require
urgent, real-time or phone-based interactions or complex project analysis
and dump analysis
issues. Issues of this nature are best handled working with a dedicated
Microsoft Support
Engineer by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights
- Follow-Ups:
- RE: VS Setup project: detect install folder automatically?
- From: Steven Cheng[MSFT]
- RE: VS Setup project: detect install folder automatically?
- Prev by Date: call .bat file using vb.net dll
- Next by Date: Re: Visual Studio Installation Error
- Previous by thread: call .bat file using vb.net dll
- Next by thread: RE: VS Setup project: detect install folder automatically?
- Index(es):
Relevant Pages
|
Loading