AppdataFolder中的文件对所有用户均不可见-Wix [英] Files in AppdataFolder not visible for all the users -Wix

查看:60
本文介绍了AppdataFolder中的文件对所有用户均不可见-Wix的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个插件,其中的安装程序是使用wix构建的.安装安装程序时,我需要在该appdatatfolder中包含许多文件,例如helpdocument,logs和 Mainly Templates .文件和文件夹将安装程序安装后会自动创建.

我的需要是

  1. Initailly,我的问题是,仅为安装了安装程序的用户创建了此文件夹和文件.但是我希望这些文件夹和文件可见适用于包括admin在内的所有用户.
  2. 该文件和文件夹包含模板,这里有两种类型的模板 2.1.PRE定义的模板包含在设置中-应该对所有用户可见. 2.2.用户定义的模板,它们是由用户在使用应用程序时创建,并且仅对以下用户可见创建了它.(ie)它必须是特定于用户的.

解决方案

所有对所有用户可见的内容都应保存到"CommonAppDataFolder"中,仅当前用户的所有内容都应保存到"AppDataFolder"中./p>

只需创建一个ID设置为适当值的Directory元素,如下所示:

 < Fragment><目录ID ="TARGETDIR"名称="SourceDir"><目录ID ="=" CommonAppDataFolder><目录ID ="=" INSTALLDIR名称=" CommonTemplates"/></目录><目录ID ="AppDataFolder"><目录ID ="=" INSTALLDIR2名称=" UserSpecificTemplates"/></目录></目录></片段> 

有关其他常见位置,请参考此列表:https://msdn.microsoft.com/zh-CN/library/aa370905(VS.85).aspx#system_folder_properties

i have developed an addin where its setup was build using wix.When the setup being installed i need to have many files like helpdocument ,logs and Mainly Templates in that appdatatfolder .The files and folder will be automatically created when the setup got installed.

My need is

  1. Initailly my problem is, this folder and files are created only for user who installed the setup.But i want these folder and files visible for all the user including admin.
  2. That file and folder contains templates,here there are two types of templates 2.1.PRE DEFINED TEMPLATES which are included in the setup- It should be visible for all the users. 2.2.USER DEFINED TEMPLATES which are created by users when using the application and it should be only visible for the user who created it.(ie)It must be user specific.

解决方案

Anything that needs to be visible to all users should be saved into 'CommonAppDataFolder', and anything for just the current user should be saved into 'AppDataFolder'.

Just create a Directory element with the id set to the appropriate value as illustrated below:

  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="CommonAppDataFolder">
        <Directory Id="INSTALLDIR" Name="CommonTemplates"/>
      </Directory>

      <Directory Id="AppDataFolder">
        <Directory Id="INSTALLDIR2" Name="UserSpecificTemplates"/>
      </Directory>
    </Directory>
  </Fragment>

Refer to this list for other common locations: https://msdn.microsoft.com/en-us/library/aa370905(VS.85).aspx#system_folder_properties

这篇关于AppdataFolder中的文件对所有用户均不可见-Wix的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆