Register Explorer COM extension only if specific task was selected

[亡魂溺海] 提交于 2019-12-23 03:40:10

问题


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.

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.

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.


回答1:


Create two entries in [Files]:

  • one with regserver flag to process when IntegrateToExporer task is selected
  • one without the regserver flag to process when IntegrateToExporer task is not selected
[Files]
Source: "my.dll"; DestDir: "{app}"; Flags: regserver; Tasks: IntegrateToExporer
Source: "my.dll"; DestDir: "{app}"; Tasks: not IntegrateToExporer

See Components and Tasks Parameters in Inno Setup documentation.



来源:https://stackoverflow.com/questions/29003187/register-explorer-com-extension-only-if-specific-task-was-selected

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!