cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
james_decosta
Level 9

ok if i approach as this where am i going wrong

hi,
now i am using the built in choose jvm panel of installer and after that i add
a custom code action which contains code as this:
public void install(InstallerProxy ip) throws InstallException {
// TODO Auto-generated method stub
String javaexecutable=ip.substitute("$JAVA_EXECUTABLE$");
if(javaexecutable.contains("\\Java\\jdk1.5.0_08\\bin\\java.exe")){
ip.setVariable("$GREENFLAG$","1");
}
else{
ip.setVariable("$GREENFLAG$","0");
}


}
And after this custom code action i have added a built in message dialog of installanywhere and on it i added a rule which if returns TRUE then i abort the installation,the code is as :


public boolean evaluateRule() {
// TODO Auto-generated method stub
String todefer=ruleProxy.substitute("$GREENFLAG$");
if(todefer.equals("1")){
return false;
}
else if(todefer.equals("0")){

return false;
}
else
{
return false;
}

}

Can anyone say me where i am going wrong
james
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

Can your custom code rule read the value of $JAVA_EXECUTABLE$ directly?
0 Kudos
james_decosta
Level 9

hi ,
i am able to get the value of $JAVA_EXECUTABLE$ which i am reading and yes my purpose is solved.
james.
0 Kudos