- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在为 Windows 的以太坊客户端编写 dapp。为了让 dapp 可供用户使用,我必须将特定文件放在 appdata 的文件夹中。所以我应该将一些文件放在 %appdata%\Parity\Ethereum\dapps\mydappname
中。但是我总是在使用 WIX 时遇到奇怪的错误,最后一个是
Error 93 ICE64: The directory dapp is in the user profile but is not listed in the RemoveFile table.
我有以下myapp.wixproj
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>8beed2e4-8784-4cb5-8648-cdf55c5defe6</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>FairsDapp</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>HarvestPath=dapp</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="Product.wxs" />
<Compile Include="Dapp.wxs" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<Target Name="BeforeBuild">
<HeatDirectory
DirectoryRefId="INSTALLFOLDER"
OutputFile="Dapp.wxs"
Directory="dapp"
ComponentGroupName="SourceComponentGroup"
ToolPath="$(WixToolPath)"
PreprocessorVariable="var.HarvestPath"
AutogenerateGuids="true" />
</Target>
</Project>
以及以下 wxs:
<?xml version="1.0" encoding="UTF-8"?>
<Wix
xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Dapp" Language="1049" Version="1.0.0.3" Manufacturer="Me" UpgradeCode="fb09dccc-6606-4b5d-8dcb-28146c28663a" Codepage="1251">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MediaTemplate EmbedCab="yes"/>
<Feature Id="ProductFeature" Title="FDapp" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="AppDataFolder">
<Directory Id="Parity">
<Directory Id="dapps">
<Directory Id="INSTALLFOLDER" Name="F2"></Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"></ComponentGroup>
</Fragment>
</Wix>
我发现我必须使用 heat
任务来创建正确的文件树,但现在我被困在简单的任务“将这些文件复制到用户机器上”。
最佳答案
我不熟悉这种类型的应用程序(dapp for ethereum client for windows)——所以我担心建议必须是通用的。
每用户文件和注册表设置:通常,使用 MSI 很难将文件部署到用户配置文件和 HKCU 设置。正如 Chris 指出的那样,它基本上只适用于安装 MSI 的用户,除非您主动添加构造以将文件复制到所有用户配置文件,即使那样它也有点笨拙。
方法:很久以前我就这个主题写了一个很长的答案:Create folder and file on Current user profile, from Admin Profile (冗长而详尽,但没有任何自动解决方案)。
Preferred Approach: Before getting involved in too much complexity, the easiest approach is generally to use your application to copy the userprofile files in place for every user on first launch - instead of using the setup to install user-specific files.
This requires that there is a separate application executable to launch, generally via its own shortcut - which it might not be? It generally does not work for addins for example.
Approach 1: Install template files per-machine and then copy them to each user's userprofile on application launch.
Approach 2: Alternatively I like to download files directly from a server or database and put in the userprofile - also on first launch.
Apply Updates?: There are ways to ensure that you can re-copy files if there are changes to your templates as described here: http://forum.installsite.net/index.php?showtopic=21552 (Feb 2019 converted to WayBack Machine link).
错误:您报告的具体问题与需要每个用户的注册表项路径和针对用户配置文件位置的所有文件夹的 RemoveFolder 条目有关:
<Directory Id="AppDataFolder">
<Directory Id="Parity">
<Directory Id="dapps">
<Directory Id="INSTALLFOLDER" Name="F2">
<Component Guid="{77777777-7777-7777-7777-7777777777DD}" Feature="MainApplication">
<RegistryKey Root="HKCU" Key="Software\TestManufacturer\TestApp">
<RegistryValue Name="Flag" Value="1" Type="string" KeyPath="yes" />
</RegistryKey>
<RemoveFolder Id="RemoveINSTALLFOLDER" Directory="INSTALLFOLDER" On="uninstall" />
<RemoveFolder Id="RemoveParity" Directory="Parity" On="uninstall" />
<RemoveFolder Id="Removedapps" Directory="dapps" On="uninstall" />
<File Source="Test.exe" />
</Component>
</Directory>
</Directory>
This is just one of MSI's conventions and quirks. As already stated, install all files per-machine and copy them to the userprofile with the application instead. It will dis-entangle them from any setup interference in the future. Then you do not need to deal with these RemoveFolder issues.
关于msbuild - 使 WIX 安装程序将文件放置在 AppData 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52589789/
我一直在尝试查找文章或发布列出 WiX (Windows Installer XML)/WiX 工具集的功能限制的文章,但均未成功。使用 WiX 几个星期后,我至少能想到两个 限制 在最新的 RTM
我们在 SomeDialog.wxs 文件中有一个 WiX 片段,它会提示用户输入一些信息。它在 InstallerUI.wxs 文件中控制对话框顺序的另一个片段中被引用。当然,Product.wxs
我们有多个配置文件。根据所选的环境,正确的文件将被复制,其余文件应被删除。 我正在使用RemoveFile,但是不会删除任何内容,或者可能是我没有正确使用它。复制所有文件后,有人可以举一个例子在安装过
我正在为现有产品编写 MSI。在以前的版本中有一个自定义操作,它不仅限于在安装时运行,现在在使用 MajorUpgrade 卸载时失败。 新安装程序中是否有任何方法可以告诉 WiX 在卸载时跳过该特定
我需要在安装之前检查 .NET Framework。我添加了这个 文件的开头包含 并在链接时出现错误 error LGHT0094 :
如果在功能选择树中选择了另一个功能,是否有任何方法可以强制安装特定功能?那就是没有让功能成为它们依赖项的子项? 最佳答案 是的,这应该是可能的,如果您在 Feature 元素下使用 Condition
有没有办法在 WiX 中强制自动登录? 目前,要生成日志,我需要使用此参数执行我的包: application.msi /l*v log.txt 我想在 中找到一个方法标记 - 例如 - 强制日志始
我正在为我的项目创建一个 WIX 模板,以确保相对标准的布局。 我已经使用 定义了一个变量来引用主应用程序其中 MyApp 是引用项目的名称。然后,我使用 MainApp 变量在 .wxs 和 .w
我有一个名为 MyProject(P2P) 的 visual studio 项目,它一直运行良好。 现在我正在使用 Wix 3 将这个项目打包到 MSI 中,其中一个步骤是编写组件节点:
我正在使用Wix 3.6。我有一个问题,在卸载时是否打开了任何窗口并显示在任务栏中(此窗口是我试图卸载的msi的一部分),它显示了一个对话框,要求用户关闭应用程序(“在继续安装之前,应关闭以下应用程序
我需要澄清 *.wxs 文件中的目录结构。据我所知,它将文件安装在我们在目录元素中指定的目录中。它还有其他用途吗? 如果它确实描述了将安装产品的目录结构,那么如果用户在安装程序中有浏览选项会发生什么。
我们已经为我们的应用程序创建了 WIX 安装程序。我们面临的问题是: 我们已经定义了两个不同的自定义操作(比如 ActionForInstall 和 ActionForUninstall),我们希望在
我有一个应用程序安装程序,无论版本号如何,都需要通过任何现有版本进行安装。 相反,我有一个安装程序,不断说我需要添加/删除程序。对于我的测试人员而言,这是非常令人沮丧的行为,因为这只会在没有真正原因的
我正在使用VS 2010创建一个由Wix安装的程序,并且已经准备好product.wxs。 在我的wxs文件中,我有类似以下的目录定义:
关注 example here ,我在 ProgramMenuFolder 中添加了一个快捷方式启动我的应用程序。 (我的代码实际上更简单,因为我不需要额外的文件夹。)
即使在重新启动后,服务仍然存在,即使可执行文件消失了。我正在使用 WIX 版本 3.0.5419.0 安装 Windows 服务工作正常。卸载它似乎什么也没做。卸载日志文件的部分
我正在尝试配置 WiX 设置和库,以便将库中文件之一的版本用作设置中的 Product/@Version。 背景 在本地定义文件的设置中,这相对简单,因为假设组件项目被 WiX 项目引用然后配置:
我想在wix项目生成的msi文件的文件名中包含一些动态部分。这个动态部分应该由变量控制,这些变量是我的wix项目的一部分,并且应这样声明: 有谁知道将wix变量的值发送给链接器以将其用作输出文件名的
我真的觉得我不必为了获得这样的基本信息而在SO上提问,但是我在任何地方都找不到可靠的消息来源。 WiX v4是否已发布?开发中?在Beta中?还在设计中? 如此看来,许多人似乎已经在使用WiX v4。
如果注册表项 HKEY_CURRENT_USER\Control Panel\International\LocaleName 的值为 de-DE,我希望将 INSTALL_DE 属性值设置为 1。
我是一名优秀的程序员,十分优秀!