How to create share for a whole drive under WiX?
- by mem64k
I would like to create a share for a whole drive in my WiX installer project. The default approach for share creation works just fine for folders, but not for drives! The following code snippet illustrates the problem:
<!-- Works! -->
<Property Id="MySharePath"><![CDATA[X:\ROOT]]></Property>
<!-- Works NOT!
<Property Id="MySharePath"><![CDATA[X:\]]></Property>
-->
<Directory Id="MySharePath" Name=".">
<Component Id="C__AddShare"
Guid="$(var.GuidAddhare)"
KeyPath="no"
Permanent="yes">
<CreateFolder/>
<!-- Create necessary share -->
<util:FileShare Id="MY_SHARE"
Name="MY_SHARE"
Description="MY_SHARE">
<util:FileSharePermission ChangePermission="yes"
CreateChild="yes"
CreateFile="yes"
Delete="yes"
DeleteChild="yes"
GenericAll="yes"
GenericExecute="yes"
GenericRead="yes"
GenericWrite="yes"
Read="yes"
ReadAttributes="yes"
ReadExtendedAttributes="yes"
ReadPermission="yes"
Synchronize="yes"
TakeOwnership="yes"
Traverse="yes"
User="LukeSkywalker"
WriteAttributes="yes"
WriteExtendedAttributes="yes"/>
</util:FileShare>
</Component>
</Directory>
Does anybody has a hint for this?