Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Path 如何在installlocation路径中连接两个变量_Path_Wix_Installation_Concat_Wix3.7 - Fatal编程技术网

Path 如何在installlocation路径中连接两个变量

Path 如何在installlocation路径中连接两个变量,path,wix,installation,concat,wix3.7,Path,Wix,Installation,Concat,Wix3.7,我在WIX基本设置配置上有一些问题。 我想将我的文件安装到ProgramFiles/NameOfCompany/NameOfProduct中。 我现在有以下配置: <?define ProductName="ProductName" ?> <?define Manufacturer="CompanyName"?> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFil

我在WIX基本设置配置上有一些问题。 我想将我的文件安装到ProgramFiles/NameOfCompany/NameOfProduct中。 我现在有以下配置:

<?define ProductName="ProductName" ?>
<?define Manufacturer="CompanyName"?>
<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="INSTALLLOCATION" Name="$(var.ProductName)">
      <Component Id="ProductComponent" Guid="b11556a2-e066-4393-af5c-9c9210187eb2">
        <File Id='SampleAppEXE' Name='SampleApp.exe' Source='ClipboardActiveX.dll' Vital='yes' />
      </Component>
    </Directory>
  </Directory>
</Directory>

问题是,当我尝试在INSTALLLOCATION目录项中设置类似于folder1/folder2的内容时,出现了以下错误:

The Directory/@Name attribute's value, 'folder1/folder2', is not a valid long name because it contains illegal characters.  Legal long names contain no more than 260 characters and must contain at least one non-period character.  Any character except for the follow may be used: \ ? | > < : / * ".
Directory/@Name属性的值“folder1/folder2”不是有效的长名称,因为它包含非法字符。合法的长名称不超过260个字符,并且必须至少包含一个非句点字符。可以使用除以下字符以外的任何字符:\?\><:/*".
我想要像这样的东西:

<?define ProductName="ProductName" ?>
<?define Manufacturer="CompanyName"?>
<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="INSTALLLOCATION" Name="$(var.Manufacturer)\$(var.ProductName)">
      <Component Id="ProductComponent" Guid="b11556a2-e066-4393-af5c-9c9210187eb2">
        <File Id='SampleAppEXE' Name='SampleApp.exe' Source='ClipboardActiveX.dll' Vital='yes' />
      </Component>
    </Directory>
  </Directory>
</Directory>

必须对嵌套目录使用嵌套目录元素。如下所示:

...
<Directory Id="ProgramFilesFolder">
    <Directory Id="Manufacturer" Name="$(var.Manufacturer)">
        <Directory Id="INSTALLLOCATION" Name="$(var.ProductName)">
...
。。。
...

必须对嵌套目录使用嵌套目录元素。如下所示:

...
<Directory Id="ProgramFilesFolder">
    <Directory Id="Manufacturer" Name="$(var.Manufacturer)">
        <Directory Id="INSTALLLOCATION" Name="$(var.ProductName)">
...
。。。
...

好的,我在这个问题上找到了这个选项,好的,我在这个问题上找到了这个选项,是的,谢谢,我想我尝试了这个,但又出现了一个错误,很抱歉我的疏忽。是的,谢谢,我想我尝试了这个,又出现了一个错误,很抱歉我的疏忽。