卸载后留下的消息队列

发布于 2024-10-08 00:23:20 字数 1527 浏览 0 评论 0原文

我使用 MsmqExtension 创建私有消息队列。但在卸载过程中,队列将被保留,没有任何权限,并且无法手动删除。

我缺少什么?

这是我写的一个小测试设置:

<util:Group Id="Admins" Name="Administrators"/>
<util:Group Id="Everyone" Name="Everyone"/>

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="INSTALLLOCATION" Name="WixProject1">
      <Component Id="cmpCCFCC98FF29F9839A11C5E93C1B73C3E" Guid="510DB8D1-A435-42A8-A8E8-5A4695CFBD7C" KeyPath="yes">
        <msmq:MessageQueue Id='CreateTQ'
               Label ='Test Queue'
               PathName='.\Private$\Test_Queue'
               Transactional='yes'>

          <msmq:MessageQueuePermission Id='CreateTQPermissions_Admins'
                                       QueueGenericAll='yes'
                                       Group='Admins' />

          <msmq:MessageQueuePermission Id='CreateTQPermissions_Everyone'
                                       GetQueueProperties='yes'
                                       GetQueuePermissions='yes'
                                       WriteMessage='yes'
                                       Group='Everyone' />
        </msmq:MessageQueue>
      </Component>
    </Directory>
  </Directory>
</Directory>

    <Feature Id="ProductFeature" Title="WixProject1" Level="1">
  <ComponentRef Id="cmpCCFCC98FF29F9839A11C5E93C1B73C3E"/>
    </Feature>

谢谢你!

I use MsmqExtension to create a private message queue. But during uninstall the queue is left behind without any rights and can't be deleted manually.

What am I missing?

This is a little test setup I wrote:

<util:Group Id="Admins" Name="Administrators"/>
<util:Group Id="Everyone" Name="Everyone"/>

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="INSTALLLOCATION" Name="WixProject1">
      <Component Id="cmpCCFCC98FF29F9839A11C5E93C1B73C3E" Guid="510DB8D1-A435-42A8-A8E8-5A4695CFBD7C" KeyPath="yes">
        <msmq:MessageQueue Id='CreateTQ'
               Label ='Test Queue'
               PathName='.\Private$\Test_Queue'
               Transactional='yes'>

          <msmq:MessageQueuePermission Id='CreateTQPermissions_Admins'
                                       QueueGenericAll='yes'
                                       Group='Admins' />

          <msmq:MessageQueuePermission Id='CreateTQPermissions_Everyone'
                                       GetQueueProperties='yes'
                                       GetQueuePermissions='yes'
                                       WriteMessage='yes'
                                       Group='Everyone' />
        </msmq:MessageQueue>
      </Component>
    </Directory>
  </Directory>
</Directory>

    <Feature Id="ProductFeature" Title="WixProject1" Level="1">
  <ComponentRef Id="cmpCCFCC98FF29F9839A11C5E93C1B73C3E"/>
    </Feature>

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南风几经秋 2024-10-15 00:23:20

您可以在卸载时调用 CustomAction。在自定义操作中,您可以编写自己的代码来删除消息队列。

<Custom Action="DeleteMSMQ" After="InstallFinalize">REMOVE</Custom>

此操作仅在REMOVE上调用。

You can call a CustomAction on uninstall. And in the customaction you can write your own code to delete messagequeue

<Custom Action="DeleteMSMQ" After="InstallFinalize">REMOVE</Custom>

This action will be called only on REMOVE.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文