我写了复仇的Windows客户端一个DAPP。为了使供用户DAPP我必须把在应用程序数据文件夹中的特定文件。于是我就应该把一些文件%appdata%\Parity\Ethereum\dapps\mydappname
。但是,我总是与维克斯奇怪的错误,最后一个是
错误93 ICE64:目录DAPP是在用户配置文件,但没有在RemoveFile表中列出。
我有以下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了复仇的Windows客户端)不熟悉的 - 这样的建议必须是通用的,我害怕。
每用户文件和注册表设置:一般情况下部署文件到用户配置文件和HKCU设置是很难与MSI。正如克里斯指出,它基本上只适用于安装MSI用户,除非你主动添加结构得到复制到所有用户配置文件,而且当时是有点笨重。
方法:我写了一个很长的答案是很久以前的主题:Create folder and file on Current user profile, from Admin Profile(长期和复杂的,但没有任何AUTOMAGIC解决方案)。
首选的方法:卷入太多的复杂性之前,最简单的方法一般在使用应用程序的文件USERPROFILE到位复制了第一次启动每个用户 - 而不是使用安装程序来安装用户特定的文件。
这就需要有一个单独的应用程序可执行文件来启动,通常是通过自己的快捷方式 - 它可能不是?它一般不用于加载项,例如工作。
- 方法1:安装模板文件的每台机器,然后将它们复制到每个用户在应用程序启动用户配置文件。
- 方法2:另外我喜欢直接从服务器或数据库下载文件,并把在USERPROFILE - 也是第一次启动。
应用更新?:有办法,以确保如果这里描述有改变你的模板,您可以重新复制文件:http://forum.installsite.net/index.php?showtopic=21552(2019年2月转换为Wayback机器链接)。
错误:你举报的具体问题与需要每个用户的注册表项路径和靶向USERPROFILE位置的所有文件夹一个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>
这仅仅是微星的公约和怪癖之一。如前所述,安装的所有文件的每台机器,并将它们复制到用户配置文件与应用程序来代替。这将在未来的任何设置干扰DIS-纠缠他们。然后,你就不需要处理这些RemoveFolder问题。