cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ICE999
Level 5

System search property in feature condition

Hi

I have another issue that is bothering me.
My goal is to let the installer check for a certain file or registry and if that is found, certain features should be installed. I've read the installshield manual and I created in the system search a search for a file and the result is stored in a property (which i created in property manager). I also checked the statement "Store the value in the property and use the property in an install condition" (i wonder what value is used).
Then i went to my feature view and in the feature condition builder i wanted to use my created property. But in the drop down list of property's there's only a list starting with Adminuser, Alpha until Windowsbuild, but not my property that i created.

So my questions are, is it possible to use the self created property's in that condition builder?
If not, how do i have to do the trick with the conditions on the features for installed apps (files or reg keys)?

Thanks for the help.
Labels (1)
0 Kudos
(9) Replies
RobertDickau
Flexera Alumni

Yes, you can use custom properties in a feature condition (or a component condition, custom action condition, dialog-control condition, and so on); I think the condition builder shows only built-in properties.

P.S. To test the value contained in the system search condition, you can create an MSI log file, or use [PROP_NAME] in a dialog box, or many other things...
0 Kudos
ICE999
Level 5

So i just check the contents of the property (probably 1 or 0) and i can use it in the condition even if it doesn't show it in the builder?

I'll try it tomorrow.
0 Kudos
ICE999
Level 5

I tried today, but it didn't work.

I'm able to show a string, or the contents of a variable declared within the script in a message box, but the contents of a private property is not shown ( gives me errors when i compile the script). So i'm still not sure what value a property receives when a system search has found it's goal.

I tried with a feature condition PROPERTY < 1 while it's value was set to 0 in the property table.
I did a systemsearch on a file (which was present) and the result of the search should've been placed in PROPERTY. After which my feature with the condition on should not have been installed. But unfortunatly it wasn't ... 😞

Can anyone describe me exactly what to do? Or point me to a working example?

Thanks in advance
0 Kudos
RobertDickau
Flexera Alumni

For a start, to test the value contained in the system search condition, you can create an MSI log file, or use [PROP_NAME] in a dialog box, or many other things...

(If your search property is already in the Property Manager view with value 0, perhaps delete from there, too.)
0 Kudos
ICE999
Level 5

Funny that you mention the log. Logging with installshield is not working properly, i added the logging via menu Build/Settings and in tab MSI log file i added the location (root) and Verbose logging. But when i tested the condition, i searched for a log but nothing was found ...
I tried the MSI separatly (to use parameter /Lv) but since it is an installshield project i cannot run it without the setup.exe.

I still have to find the commandline parameters for the setup.exe logging thing, couldn't find one in the installshield PDF ...

I'm used to work with Wise package studio and to be honest, i had far less trouble with these kind of small things. I must admit that this package is more difficult then the things i've done with Wise package studio.
0 Kudos
RobertDickau
Flexera Alumni

Perhaps pass the msiexec /L switch through the /V switch, as in:

setup.exe /V"/L*v C:\everything.log"
0 Kudos
ICE999
Level 5

Robert

Thanks for helping me out, you seem to be the one of the few members that actually try to help other people out.
I'll try your suggestions today.

Regards
0 Kudos
ICE999
Level 5

The system search is working. When i do a search for a registry key, it stores the value data in the property that i wanted to use.
When i entered this system search, it was immediatly used as een Launch condition, which i don't want to, so i deleted this entry in the launchCondition table.
I wanted to use this Property as a Feature condition. So i added following condition on a feature: Level: 200 Condition: TESTRESULT="test"
So it should raise the installlevel to 200 when the regkey is found.
After the install, i examined the log, and the registry key was found, the property had the value 'test', but my feature was still installed.
The installlevel was set to '1', the condition should've been triggered and the installlevel of my feature should've been raised to 200. But it didn't.
The whole installlevel story doesn't seem work either. Normal behaviour should be that every component with an installlevel lower or equal then the installlevel of the product should be installed. But because i'm struggling so hard now, i manually changed the feature installlevel to 200. Recompiled and tested it and the feature was still installed 😞

In the past i used ADDLOCAL property to play with feature installs, you can specify on the commandline what features are installed, but this install should be a mix of users choice (which works pefectly with the standard dialoge) and an automatic search and disable. This last item seems to be a pain in the ass and i just can't get it right (if it's technically possible).
0 Kudos
ICE999
Level 5

Is it possible that it has to do with the CostFinalize that is already been done by the time my condition is checked?
0 Kudos