安装程序设置一个默认数据库(如果尚不存在)并且我想从卸载过程中排除它(或者有用户选项将其删除,一旦我花时间去弄清楚自定义GUI)

似乎最佳实践似乎只是在运行时创建数据库而不是安装时间,但为了争论,这是可能的以及如何实现?

我知道如何将其设置为有条件地安装它:

<Feature Id="Database" Display="hidden" Level="1">
  <ComponentRef Id="DatabaseComponent"/>
  <!-- Cancels installing of new DB if it already exists-->
  <Condition Level="0">DBEXISTS</Condition>
</Feature>

但我不确定如何以卸载为条件。

有帮助吗?

解决方案

使组件永久化(Component @ Permanent =&quot; yes&quot;)。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top