如何使用wix安装程序压缩多个文件和目录,以及将其复制并安装到程序文件以外的其他文件 [英] How to compress multiple files and directories with wix installer and copy and install to other than program files

查看:98
本文介绍了如何使用wix安装程序压缩多个文件和目录,以及将其复制并安装到程序文件以外的其他文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用wix安装程序压缩多个文件和目录,然后复制到自定义固定位置,例如. C:/MyAPP在安装时. 我有以下目录结构,希望将其包含在wix msi中.

I want to compress multiple files and directories with wix installer and copy to custome fixed location eg. C:/MyAPP it while installing. I have following directory structure which i want to include into wix msi.

目录结构:

MYAPPBin

  • myapp.exe

  • myapp.exe

demo.dll

demo.dll2

demo.dll2

推荐答案

操作方法 :对于许多技术和实践,我都反对安装到根目录 原因,但以下是有关操作方法的说明: https://support.firegiant.com/hc/zh-CN/articles/230912267-Install-to-the-root-of-system-drive-

How-To: I am against installing to the root, for many technical and practical reasons, but here is a description of how to do it: https://support.firegiant.com/hc/en-us/articles/230912267-Install-to-the-root-of-system-drive-

没有讲话" :哦,让我们大声疾呼:-).为什么不应该这样做? 1) : Standard :这不是标准的. 2) : Necessity :通常没有必要. 3) : Corporate :由于标准不合格,通常不被企业计算机接受. 4) Support :因此,您将收到支持请求,询问是否可以由应用程序打包程序解决此问题以进行公司部署-特别是如果您有很多客户和用户,根据. 5) : Technical :通常,您会在维修,修补和升级过程中看到技术部署问题. 6) : Permissions :如果要在其中写入文件,将面临ACL(权限)问题(检查操作系统差异,我没有检查)最近)-因此您还需要应用完全的写权限-根源上的人们面临的一个安全问题. 7) Tools :现代部署技术积极地使其很难打破这样的规则,这有充分的理由-最终:另一个为之奋斗的风车一无所获? 8) Longevity :Windows将来的更改可能意味着您的应用程序无法从该位置正常运行吗? 9) : Bloating :如果执行此操作确实会使系统驱动器的根部膨胀,并且确实会使很多人烦恼-触发意外删除和意外删除. 10) Backup :备份系统可能会不小心将产品拿起进行存储,从而使备份过大-如果产品很大,则非常糟糕(除非需要备份) . 11) : System Restore :老实说,我看到系统还原将整个计算机弄得一团糟,我想知道它对系统根目录上的内容有什么作用?我不确定此处有关系统还原及其有效性的部分(朝下). 12) : Windows Updates :不是很好的项目,但让我们列出一下.我们已经看到Windows Update曾经疯狂地执行过诸如删除用户数据之类的事情,并且可以想象它可能会对根文件夹造成干扰. 13) : Security Software :防病毒和恶意软件扫描程序如何处理根文件夹?我从未见过任何问题,但是他们不断添加越来越多的怪异功能,突然间您遇到了无法预料的问题? (我已经使用防病毒工具隔离了我新构建的二进制文件:-)-vernichtete!). 14) Indexing :对于部署大量数据文件,系统驱动器的根目录上可能没有索引吗? (如果需要). %ProgramFiles% 中也没有索引,但是 user-profile folders 中通常没有索引(桌面,我的文档等)-如果您部署的文件是模板等. 还有其他问题.以标准方式安装会更好吗?

"No Speeches": Oh, let's rant :-). Why you should not do it? 1) Standard: It is not standard. 2) Necessity: It is generally not necessary. 3) Corporate: It will often not be accepted onto corporate machines for failing standards. 4) Support: Accordingly you will get support requests asking if this can be fixed by application packagers for corporate deployment - especially if you have lots of customers and user-base. 5) Technical: Typically you see technical deployment problems during repair, patching and upgrades. 6) Permissions: You will face ACL (permission) issues if you want to write to files in there (check for OS-differences, I didn't check lately) - so you need to apply full write permissions as well - a security issue when it is so in people's face on the root. 7) Tools: Modern deployment technologies actively make it hard to break the rules like this, for good reason - in the end: another wind-mill to fight for nothing gained? 8) Longevity: Future changes in Windows could mean your application no longer runs properly from that location? 9) Bloating: If many software do this it really bloats the root of your system drive and that can really annoy a lot of people - triggering unexpected and accidental deletion. 10) Backup: The product could accidentally be picked up for storage by backup systems bloating the backup - very bad if the product is big (unless backup is desired). 11) System Restore: I have honestly seen system restore mess up whole computers, and I wonder what it does to things that live on the system root? I don't know for sure. A section here on system restore and its lunacy (towards bottom). 12) Windows Updates: Not a great item, but let's list it. We have seen Windows Updates to crazy things like delete user's data before, and it is conceivable that it could cause interference for root folders. 13) Security Software: How does anti-virus and malware scanners like root folders? I have never seen any problems, but they keep adding more and more weird features and suddenly you have problems with something unexpected? (I have had anti-virus tools quarantine my freshly built binaries :-) - vernichtete!). 14) Indexing: For deployment of large numbers of data files, there is probably no indexing on the root of your system drive? (if that is desired). There is no indexing in %ProgramFiles% either, but there generally is in user-profile folders (desktop, my documents, etc...) - if the files you deploy are templates and such. And there are further issues. Much better to install in standard ways?

我可以添加:勤奋的系统管理员(具有清理狂(正式诊断)可能会删除此类文件夹,作为清理脚本和审核的一部分)(尤其是如果您使文件夹名称更加神秘),或至少要扔掉该应用程序,或测试将其移至 %ProgramFiles% 以查看其是否有效.它们可能允许像这样安装核心安全软件,以便轻松访问其中的设置和工具,但这很少见.开发人员可以接受以这种方式安装的SDK-出于相同的原因:可访问性和易用性.某些服务器软件也可能像这样针对单一用途服务器"进行部署,但是根据我的经验,它通常会转到系统驱动器以外的其他驱动器,例如 D: .对于几乎任何其他目的,它都是有害的-我认为,我认为与许多部署人员共享.

Anecdotally I can add: Diligent system administrators with cleanup-mania (formal diagnosis that) may delete such folders as part of their cleanup scripts and auditing (especially if you make the folder name mysterious), or at least want to throw out the application, or test moving it to %ProgramFiles% to see if it works. They may allow core security software to install like this, for easy access to settings and tools in there, but that is rare. Developers may accept SDKs installed this way - for the same reason: accessibility and ease of use. Some server software may also be deployed like this for "single-purpose-servers", but then it often goes to another drive than the system drive - such as D: - is my experience. For almost any other purpose it is detrimental - in my opinion and I think I share it with many deployment guys.

例外" :如果要使用要部署的文件,我可能会选择一种默认为我的文档"的自解压"方法进行更改和修改.甚至是桌面上的一组HTML模板.这一切都取决于什么才有意义,什么对用户有用,以及在没有意大利面条事故"的情况下可以提供哪些技术支持.

"Exceptions": I might opt for a "self-extractor" kind of approach defaulting to "My Documents" if the files you are deploying are to be used to change and modify. Or even the desktop for a set of HTML templates. It all depends on what makes sense, what is useful for users and what can be technically supported without "spaghetti incidents".

这篇关于如何使用wix安装程序压缩多个文件和目录,以及将其复制并安装到程序文件以外的其他文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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