[wix-devs] Queue creation custom action

Fyodor Koryazhkin fyodorkor at gmail.com
Thu Feb 2 02:35:03 PST 2017


Hi,
Yes, I experienced this my self. Below is the test project.
I am not sure that this can be defined as a bug. It can be described as
"misuse because of poor documentation" because the Group Administrators is
added automatically by queue creation function and therefore is not removed
during uninstallation. But if it is added explicitly by the user - that
makes the difference.

<?xml version="1.0" encoding="UTF-8"?><Wix
xmlns="http://schemas.microsoft.com/wix/2006/wi"  xmlns:util	=
"http://schemas.microsoft.com/wix/UtilExtension"
xmlns:msmq="http://schemas.microsoft.com/wix/MsmqExtension">	<Product
Id="{F03E9818-E515-43B7-8B45-CB7E6F096F66}" Name="SetupProject"
Language="1033" Version="1.0.0.0" Manufacturer="Microsoft"
UpgradeCode="{07887E2D-A180-44D5-AF16-06AF11AFE425}">		<Package
InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
 		<MajorUpgrade DowngradeErrorMessage="A newer version of
[ProductName] is already installed." />		<MediaTemplate />
 		<Feature Id="ProductFeature" Title="SetupProject"
Level="1">			<ComponentGroupRef Id="ProductComponents"
/>		</Feature>	</Product>
 	<Fragment>		<util:Group Id="Admins"
Name="Administrators"/>		<util:User Id="CurrentUser"
Name="[LogonUser]" Domain="[%USERDOMAIN]"/>		<util:User Id="Computer"
Name="[%COMPUTERNAME]$"/>		<util:Group Id="Everyone"
Name="Everyone"/>		<util:User Id="ANONYMOUS" Name="ANONYMOUS LOGON"
/>		<Directory Id="TARGETDIR" Name="SourceDir">			<Directory
Id="ProgramFilesFolder">				<Directory Id="INSTALLFOLDER"
Name="SetupProject" />			</Directory>		</Directory>	</Fragment>
 	<Fragment>		<ComponentGroup Id="ProductComponents"
Directory="INSTALLFOLDER">						<Component Id="ProductComponent"
Guid="{05E2ADD8-A0C3-4C24-A04A-7D5F038A265E}">				<CreateFolder
Directory="INSTALLFOLDER" />				<msmq:MessageQueue Id="Test"
Label="Test" PathName=".\Private$\Test" Transactional="yes"
PrivLevel="optional" >					<msmq:MessageQueuePermission Id="Test"
Group="Admins" QueueGenericAll="yes"/>					<msmq:MessageQueuePermission
Id="Test1" User="CurrentUser"
QueueGenericAll="yes"/>					<msmq:MessageQueuePermission Id="Test2"
User="ANONYMOUS" ReceiveMessage="yes" PeekMessage="yes"
/>					<msmq:MessageQueuePermission Id="Test3" Group="Everyone"
GetQueueProperties="yes"
GetQueuePermissions="yes"/>					<msmq:MessageQueuePermission
Id="Test3" User="Computer" GetQueueProperties="yes"
GetQueuePermissions="yes"/>				</msmq:MessageQueue>			</Component>		</ComponentGroup>	</Fragment></Wix>


On Tue, Jan 31, 2017 at 11:21 AM, Fyodor Koryazhkin <fyodorkor at gmail.com>
wrote:

> Hi,
> I found some issue that is probably can be a bug:
>
> If I use MSMQ extension for queue creation and in MessageQueuePermission
> element specify group Administrators then uninstalling queue does not
> actually removes it but rather makes it inaccessible. This behavior also
> likely occurs in Rollback and major upgrade when RemoveExistingProduct
> action placed at the beginning of installation (before or just after
> installinitialize).
>
> This is caused because removing permissions occurs for ALL queues and
> before actual removing.
>
> I see several possible solutions for this:
> 1. Issue a warning\error during build that the user specified
> Administrators group in MessageQueuePermitiions element. (this group with
> full permissions added by default in the code)
> or
> 2. Do not remove permissions from queues that are to be removed.
>
> Any thoughts on this issue will be welcome.
>
> Thank you.
>
>
> --
> Regards,
> Fyodor Koryazhkin..
>



-- 
Regards,
Fyodor Koryazhkin..


More information about the wix-devs mailing list