Solved

I need to change the INSTALLDIR directory in a custom action. I am using Installshield 11.5

Posted on 2006-10-23
5
3,472 Views
Last Modified: 2013-11-14
Hi,
 I am using Installshield 11.5 professional.
I have a project that creates different type of packages. Not all the packages install on the same directory, so I have a 'Custom Action' that changes INSTALLDIR according to the Release Flag variable.
I had no problems so far but no the story is a little bit different.  I had a release flag that was used to create a package and I added another release flag for that package.  The condition used in the custom action "Install UI Condition" was ISReleaseFlags="Runtime".  By leaving that condition now the custom action doesn't work anymore.  I added a subfeature (release flag 'tools') to the main feature (release flag 'Runtime').
I though it was because I added another release flag to that package.  So i tried
   ISReleaseFlags="Runtime" OR ISReleaseFlags="tools"
I also tried
   ISReleaseFlags="Runtime" AND ISReleaseFlags="tools"
None of them work.  I ran the package in debug mode and all the msi is reporting is that the the condition is false.
'MSI (c) (78:60) [15:23:25:836]: Skipping action: SetInstalldir (condition is false)'
I tried to open the package with ORCA and I can see that the Property table has the ISReleaseFlags variable with my 2 release flag, so..
What Am I missing here?  It should work.
Thanks
0
Comment
Question by:atoncelli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 20

Expert Comment

by:Daniel Van Der Werken
ID: 17793593
Should you be using:

ISReleaseFlags == "Runtime" instead of ISReleaseFlags = "Runtime"?

I think so.
0
 

Author Comment

by:atoncelli
ID: 17795024
I have applied the condition by manual.  I tried just to see what it would do and it doesn't let use it.  It says 'An invalid condition statement was supplied"
Any other suggestions?
0
 
LVL 2

Accepted Solution

by:
numansiddique earned 125 total points
ID: 17896111
There is one installscript API called SeFeatureTarget. You can use this to change the INSTALLDIR value at the run time using the installscript.
You can use this function as SetFeatureTarget("INSTALLDIR","D:\\TEMP");

I am not sure about the function name. You can check the function name or related function in the help.

You can create a  custom action which calls the script file. In the script file you can check for the condition of the flag and set the INSTALLDIR accordingly.
This could be one solution
0
 

Author Comment

by:atoncelli
ID: 18046517
This solution is not Microsoft compliance I think because it requires the creation of a script.  There should be a way to do this from InstallShield.
Thanks anyway for the suggestion.
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

734 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