我正在尝试创建用户的应用程序数据文件夹,其中我将有一些安装日志文件和其他文件。 卸载时不会删除这些文件。我试图在wix xml AppDataFolder
中添加它但是在构建时我遇到了构建错误“MyAppFolder目录在用户配置文件中,但未在RemoveFile表中列出。”
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="PosWixSetup">
<Directory Id="Images" Name="Images" />
<Directory Id="_x64" Name="x64" />
<Directory Id="_x86" Name="x86" />
<Directory Id="en_US" Name="en-US" />
<Directory Id="dlls" Name="dlls" />
</Directory>
</Directory>
<Directory Id="AppDataFolder">
<Directory Id="MyAppFolder" Name="Kamran" >
</Directory>
</Directory>
</Directory>
</Fragment>
有人可以帮助我做错了吗
答案 0 :(得分:0)
以下xml为我做了工作
<Directory Id='AppDataFolder' Name='Roaming'>
<Directory Id='_8F59BFDE_678A_D04A_B032_C90D66940878' Name='Kamran'>
<Component Id='com_dir_8F59BFDE_678A_D04A_B032_C90D66940878' Guid='EECDB3BC-65C4-4A73-A182-2976A649713E' Transitive='no'>
<CreateFolder Directory='_8F59BFDE_678A_D04A_B032_C90D66940878' />
<RemoveFolder Id='_F53B4A9B_E7AA_4C30_A42F_DDF464B4A795' On='uninstall' />
<RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]\Installer' Name='com_dir_8F59BFDE_678A_D04A_B032_C90D66940878' Type='string' Value='Kamran POS directory' KeyPath='yes' />
</Component>
<Component Id='com_B81229DC_FAC4_654D_B049_EC75EA79F23E' Guid='55A50D8C-2310-45A4-B8BF-54597EEE5B12' Permanent='no' SharedDllRefCount='no' Transitive='no'>
<File Id='_B81229DC_FAC4_654D_B049_EC75EA79F23E' DiskId='1' Hidden='no' ReadOnly='no' System='no' Vital='yes' Compressed='yes' Name='config.ini' Source='..\PosControlApplication\config.ini' KeyPath='no' />
<RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]\Installer' Name='com_B81229DC_FAC4_654D_B049_EC75EA79F23E' Type='string' Value='config.ini file' KeyPath='yes' />
</Component>
</Directory>
</Directory>