WIX组件 - >文件共享

时间:2012-09-13 02:03:31

标签: wix

我正在尝试使用FileShare共享文件夹,但我收到此错误;任何想法?

Coppying WixCommonLib
Coppying TNSORA
running Candle, candle.exe -ext WixIisExtension Product.wxs
Microsoft (R) Windows Installer Xml Compiler version 3.5.2519.0
Copyright (C) Microsoft Corporation. All rights reserved.
Product.wxs
Product.wxs(41) : error CNDL0005 : The Component element contains an unexpected child element 'FileShare'.
Product.wxs(44) : error CNDL0005 : The Component element contains an unexpected child element 'User'.

这是脚本:

    <Component Id="FilesShareComp" Win64="yes" Guid="801595A6-4CB0-481B-892E-C37A48954DD9">
      <FileShare Id="FilesShare" Name="MyFolder" Description="MyFolder">
        <Permission User="sharedusers" GenericAll="yes" />
      </FileShare>
      <User Id="shareduser" Name="testuser" CreateUser="No" Domain="[ComputerName]" Password="Password1" FailIfExists="no">
      </User>
    </Component>

1 个答案:

答案 0 :(得分:2)

试试这个

<user:User Id='Everyone' Name='Everyone' CreateUser='no' FailIfExists='no' RemoveOnUninstall='no' />
<user:FileShare Id='SharedFolder' Description='Share Folder description if any' Name='ShareFolderName'>
  <user:Permission GenericRead='yes' ReadPermission='yes' Read='yes' GenericExecute='yes' User='Everyone' />
</user:FileShare>