Solved

Appending Path Variables with MST

Posted on 2014-10-02
7
179 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

13 Experts available now in Live!

Get 1:1 Help Now