How to get another application's install path?

  • Thread starter Thread starter Jeff Yang
  • Start date Start date
J

Jeff Yang

I have two applications(A and B),and I install the two applications
seperatly.Now I want to get B's install path in A,How can I do that?Thanks.
 
I think the question can also be described as the follows:"in a deplyment
project of visual studio.net,how can I get the install path that user has
inputed "?
 
I have found the answer:In the deploying project,one can use property
[TARGETDIR] to get the target path that user has selected.so we can store
the value in a registy key.
 
I may have just answered this on another thread, but in case you are
someone else entirely :-)...

Q: Installing to a subdirectory of an already installed product.
A:
1. Product 1 is installed and has a file named MyFile.txt.
2. You use ORCA (from the Windows Installer SDK) to view the File table,
and find the row that represents MyFile.txt.
3. You get the value of the Component_ column and then open the Component
Table
4. In the Component Table you find the row that has the Component_ value in
the Component column, and get the ComponentID. Copy this value into
clipboard. Close ORCA
5. In your setup project, open the Launch Conditions Editor and add a
Windows Installer Component Search. For the ComponentID property of the new
search, paste the ComponentID.
6. Copy the Property property. It should be something like COMPONENTEXISTS1
7. Open the File System Editor and select the Application Folder
8. Edit the DefaultLocation property to be somethig like
[COMPONETNEXISTS1]MySubFolder (since the path in COMPONENTEXISTS1 includes
a trailing \)

Note: After step 6 above, you might want to add a Condition to the Launch
Conditions Editor to check if the component was found, and to block install
and show a message if it wasnt. The condition would be COMPONENTEXISTS1
(which means, it's okay to run the installer if COMPONENTEXISTS1 is not
empty).
 
Back
Top