Solved

Appending Path Variables with MST

Posted on 2014-10-02
7
190 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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…
Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

790 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