问题描述
我有一个处理文档的复杂程序。客户要求:安装期间应有条件地集成到Windows资源管理器上下文菜单中,即用户检查相应的选项。
I have a complicated program for working with documents. Client requirement: it should be conditionally integrated in Windows Explorer context menu during install, i.e. then user check the corresponding option.
所以,在我Inno Setup脚本 [Tasks]
我创建了一个名为 IntegrateToExporer
的单独任务。
并且在 [文件]
部分中-两个带有 regserver
标志的COM DLL文件(x86 / x86-64版本)。 br>
So, in my Inno Setup script [Tasks]
i've created a separate task named IntegrateToExporer
.
And in the [Files]
section - two COM DLL files (x86/x86-64 version) with regserver
flag.
我的问题是:如何使 regserver
标志有条件?
只有在以下情况下才应使用用户选择 IntegrateToExplorer
任务,否则应像其他文件一样复制文件。
My question is: how to make regserver
flag conditional?
it must be applied only if user select IntegrateToExplorer
task, otherwise file should be copied just like others.
推荐答案
在 [文件]
中创建两个条目:
- 一个
regserver
标志在选择IntegrateToExporer
任务时进行处理 - 当
IntegrateToExporer
任务为 n时,一个没有标志regserver
进行处理ot 选定
- one with
regserver
flag to process whenIntegrateToExporer
task is selected - one without the
regserver
flag to process whenIntegrateToExporer
task is not selected
[Files]
Source: "my.dll"; DestDir: "{app}"; Flags: regserver; Tasks: IntegrateToExporer
Source: "my.dll"; DestDir: "{app}"; Tasks: not IntegrateToExporer
请参见。
这篇关于仅在选择了特定任务后才注册Explorer Explorer扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!