Solved

Appending Path Variables with MST

Posted on 2014-10-02
7
193 Views
Last Modified: 2014-10-02
Hi,

I am the process of creating an installation package for Covierty.  One of the requirements of the install is to set the path variable in the registry.

It is best to do it within the MST and install them both together.

Can anyone provide examples of how to append a path envrionment variable within the MST itself?

Thanks!
0
Comment
Question by:Resonetics
  • 4
  • 3
7 Comments
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
ID: 40357161
For example, if you are going to use Orca:

1. open the original msi
2. menu Transform -> new transform
3. insert new line into the table "Environment":
environment: Path
name: *=-Path
Value: [~];c:\mypath
Component: (pick the one related to this variable)

(for more details, see article "Environment Table")

4. Menu Transform / Generate Transform....
0
 

Author Comment

by:Resonetics
ID: 40357189
Makes sense.  Just not sure about the component field.  What is typically contained in that field?

Thanks!
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40357253
it must be one of the components from the table "Component". For example, it can be the component that contains the executable that is supposed to be found by this Path. Find that executable in the table "File", and specify the same component as there.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Resonetics
ID: 40357318
I see.  And how is the correct component determined?  There are a lot of entries in the component table to choose from.
0
 

Author Comment

by:Resonetics
ID: 40357473
I was able to figure it out.  There is an entry in the component table called "registryData_HKLM" so I picked that one and tested it out.  Everything works as expected.

Thanks for the assistance.
0
 

Author Closing Comment

by:Resonetics
ID: 40357477
Thanks for the help.  This got me started and I was able to figure out the rest.
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40357610
Regarding the choice of the component. Practically, the only thing that matters is to ensure that your path variable will be configured whenever that component is installed. In simple installations there are no conditions, but sometimes there can be situations when certain component does not get installed. For example, if that component has an attached condition; or that component is a dll, and target system already has this dll of higher version; of the installation has several features, and the feature this component belongs to is optional.

For this reason, the following logic usually works best. Ask yourself: why do we need to configure path variable to begin with? answer: to ensure that certain executable X within the installation could be launched from anywhere in the system. From there, it makes the most sense to attach the path configuration to the same component where the executable X belongs. So whenever the executable is installed, the path will be configured, and if not, then not.

Both tables File and Environment have column "Component" being the foreign key of of the table Component. So if we want to find the component executable X belongs to, we go to the table "File", find our executable by file name, and make a note of the component, which is in another column. Then we specify the same component in the record in Environment table. Now this component will have the executable and the path "in one bottle".

Or, as an alternative, we can create separate component just for environment variable. This component will have to be specified in the table Component and in the table FeatureComponents.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the frequent problems with the installations is when some file or registry entry is not removed from the system upon un-installation of the product. Clean removal is always highly desirable. One major reason for that is badly authored inst…
Installations often have prerequisites, such as “Microsoft .Net framework is required for this product”. The usual implementation in MSI installations is system search for a particular registry setting representing the required prerequisite, followe…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question