sandeep.gvn
Posts: 26
Joined: Wed Jan 15, 2014 11:55 am

How to skip a dialog if a feature is disabled.

Hi,

I have a requirement where in I need to skip a specific dialog if a feature is disabled at runtime. I am trying it out the following way.

((&Feature2 = 3) AND NOT (!Feature2 = 3))

However it is not working.

Dialog gets skipped in case if the feature is enabled and unchecked the same from Configure Window, however if the feature is disabled at runtime using a custom action then this condition is not working. Could you please help me on "How to skip a dialog widow, if the feature is disabled".

Please find the attached project file for reference.

Regards,

Sandeep
Attachments
Skip Dialog POC.zip
(277.22 KiB) Downloaded 351 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to skip a dialog if a feature is disabled.

Hi Sandeep,

I'm not sure why this does not work as you expect it to. Can you please tell me how you try to disable that feature from your custom action?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sandeep.gvn
Posts: 26
Joined: Wed Jan 15, 2014 11:55 am

Re: How to skip a dialog if a feature is disabled.

Here is the customaction code.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Deployment.WindowsInstaller;

namespace SkipDialogCustomAction
{
public class CustomActions
{
[CustomAction]
public static ActionResult CustomAction1(Session session)
{
session.Log("Begin CustomAction1");

session["DISABLE_FEATURE_02"] = "TRUE";

return ActionResult.Success;
}
}
}
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to skip a dialog if a feature is disabled.

Hi,

Please try to execute the "Update Features' Install State" predefined custom action right after your own custom action and see if this work. Your custom action only sets the install condition for your feature, but the "Update Features' Install State" predefined custom action will set its state based on that condition.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”