How to create share for a whole drive under WiX?

Posted by mem64k on Stack Overflow See other posts from Stack Overflow or by mem64k
Published on 2010-04-08T16:37:53Z Indexed on 2010/04/08 16:53 UTC
Read the original article Hit count: 298

Filed under:
|
|
|
|

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?

© Stack Overflow or respective owner

Related posts about wix

Related posts about wix3