Solved

Appending Path Variables with MST

Posted on 2014-10-02
7
183 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

One of the major drawbacks of deploying applications by GPO is the complete lack of any centralized reporting. After a normal deployment, there are two ways to find out if it was successful – by looking in the event log, and by looking in the log of…
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now