Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.
Endpoint Management Community Blog

Customizations Using Properties

Created: 14 Aug 2008 • Updated: 07 Jul 2009 • 5 comments
nac's picture
0 0 Votes
Login to vote

Properties can be used to select functionality you want to install in MSI.

There are many applications which provide multiple functionalities and we want to choose among those functionalities which are to be installed. So if you are purely packaging an MSI from scratch you can provide deployer with options.

This can be done with the help of properties like INSTALLLEVEL, custom defined properties through custom actions etc

  1. With the help of INSTALLLEVEL

    I got 4 features F1,F2,F3,F4,F5 out of which I want to install F1,F2 and F4. I have set INSTALLLEVEL for F1,F2,F3,F4 and F5 as 2,4,6,1 and 8 respectively.

    Now through command line I can Pass Property INSTALLLEVEL=5 so that only F1,F2 and F4 will get installed

    eg. msiexec /i "ABC.MSI" INSTALLLEVEL=5
    
    
  2. With the help of Custom Actions

    Now here we got base for generalizations of MSI. There are some applications where we want to avoid some files or components or feature or registry, we can just conditionalize them. We can create Custom Public property.(It must be public as we need to change during installation, outside MSI.)

    Provide an option in dialog boxes to change the property value.Here on checking value will change to 8.

Wise Package Studio provides an option to apply this condition to component or feature. (Here we provided condition as, if value of INSTALLFFEATURE property is 8.)

So on checking or removing check you can choose to deploy or not to deploy that particular component or feature from MSI.

This can be effectively used for customizations.

Comments 5 CommentsJump to latest comment

R-Vijay's picture

I have something to add here. We also have another property called "INSTALLMETHOD". In our team, we usually set this to denote the type of deployment this package should undergo.

INSTALLMETHOD = I (Intellimirror)
INSTALLMETHOD = T (IBM Tivoli Deployment
INSTALLMETHOD = S (SMS Deployment)
INSTALLMETHOD = X (Citrix)

Hope this info helps, when u try to define standards for packaging.

Microsoft MVP [Setup-Deploy]
Weblog: www.msigeek.com

0
Login to vote
nac's picture

Properties can be used to do many customizations in Application, you can actually change the complete functionality moreover as Vijay said they can also be used to tell workflow followed, regarding runtime changes

But now I am doing custom changes with the help of public properties accessed through command line, I am running a Custom Action depending on the value of Property this custom action is a VB script which edits some Java script file. Now when I repair this MSI, property value is not passed and .JS file doesnt get edited.But I want to change contents of .JS file during repair also.

How should I tackle this problem? can I use registries over here?

+1
Login to vote
R-Vijay's picture

Well, one suggestion for this issue would be to call this Custom action under the condition.,

If Not Installed And (Not REMOVE)
Your custom action
End

I guess by this condition, you can acheive your requirement for MSI repair.

Cheers'
Vijay

Microsoft MVP [Setup-Deploy]
Weblog: www.msigeek.com

0
Login to vote
nac's picture

Hey Vijay ;

We are passing Property values through command line, so even if I give conditions as prescribed by you it wont work. because it will take values of the properties included in package and not values passed through command line.
I am thinking on a way of storing these runtime values in registry and then utilizing them during repair but not getting out the exact way.
+1
Login to vote
R-Vijay's picture

Well in this case, declare few dummy PUBLIC properties (TEMP1, TEMP2 etc..) and in "execute immediate" (after install initialize) write a SET property custom action to set the values of these properties with reference to commandline entries. for eg: TEMP1=CL1, TEMP2=CL2 etc..

You can give a condtion for this custom action, as i discussed above..else, use the temp stored(TEMP1, TEMP2...) propreties for your purpose.

Hope this helps.

Microsoft MVP [Setup-Deploy]
Weblog: www.msigeek.com

0
Login to vote