开发者

How to create share for a whole drive under WiX?

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.GuidAddShare)"
                KeyPath="no"
                Permanent="yes">
    <CreateFolder/>
    <!-- Create necessary share  -->  
    <util:FileShare Id="MY_SHARE"
                    Name="MY_SH开发者_运维百科ARE"
                    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?


I don't think the WiX toolset supports this today. It'd be great if you updated the FileShare extension to handle this case and contributed back to the community.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜