按功能执行自定义操作
我编写了一个自定义操作来在安装后创建计划任务。 当用户不想创建计划任务时,我不希望运行自定义操作。在安装过程中,即使我选择“功能将不可用”,schtask 也会被创建。如何阻止自定义操作执行?
I wrote a custom action to create a scheduled task after install.
I do not want the Custom Action to run when the user does not want to create the schedule task. During installation even if I select " Feature will be unAvailable" the schtask is getting created. How do i prevent the Custom Action from executing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以为 CA 执行设置一个条件:
希望有帮助。
You can set a condition for your CA execution:
Hope it helps.
添加到您的安装执行序列。
Add to your Install execute sequence.
其实我发现了问题所在。 &FeatureName = 3 告诉我要安装该功能,与此相反的是 !FeatureName = 3,这意味着该功能已经安装。这解决了我的问题,所以最终的解决方案变成了
Actually I found out the problem. The &FeatureName = 3 tells me that the feature is to be installed, and the opposite to that, is !FeatureName = 3, which means the feature is installed already. This fixed my problem so the final solution became
“MyService”是功能名称
“FEATURE_MyService”是我的条件名称:我正在使用复选框来设置 FEATURE_MyService 属性的值
"MyService" is feature Name
"FEATURE_MyService" is my condition Name: I am using checkbox to set the value of FEATURE_MyService property