如何创建一个简单地将目录复制到 Program Files 的 MSI 文件? [英] How to create a MSI file which simply copies a directory to Program Files?

查看:30
本文介绍了如何创建一个简单地将目录复制到 Program Files 的 MSI 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个 MSI 文件,它只是将一个目录复制到Program Files"目录中并在开始菜单中创建一个图标.

I want to create a MSI file, which simply copies a directory into the "Program Files" directory and creates an icon in the start menu.

仅此而已.对用户没有任何问题,没有依赖关系,没有注册表项等.只需复制目录并设置图标即可.

Nothing more. No questions to the user, no dependencies, no registry entries, etc. Just copy the directory and set the icon.

如果我们部署一个新版本的程序,那么 MSI 应该只是将新版本复制到旧版本上.没有卸载"过程.

And if we deploy a new version of our program, then the MSI should just copy the new one over the old one. No "uninstalling" procedure.

该任务使用哪种工具?

推荐答案

我想答案是任何通用工具,因为他们都可以做到这一点.这是一个(可以说是)最常用工具的列表.

I guess the answer is any common tool, since they can all do this. Here is a list of (arguably) the most common tools.

  • The Visual Studio Installer Projects (2017) are pretty simple to use - at first - and then you face a number of limitations and shortcomings that you might not be susceptible to - given your scope. Can not be automated in a build process as far as I know!
  • Advanced Installer is a commercial product and it has some free features that you can use for requirements such as yours. You could give it a test spin. Here is a great gateway to all things Advanced Installer.
  • WiX is capable of what you want to do, and entirely free. Takes a while to get used to. The Hello World of WiX (a little old and dated, but you get the picture - XML markup that is compiled to MSI format). For some reason, this messy answer of mine on WiX Quick Start has been upvoted more than usual (answer updated now - was small). Maybe skim it.

有关直接下载链接,请参阅顶部的链接答案.

See linked answer on top for direct download links.

静默安装:任何 MSI 文件都可以通过标准的 msiexec.exe 静默运行(无需 GUI) 命令行:

Silent Install: Any MSI file can be run silently (without a GUI) by means of a standard msiexec.exe command line:

msiexec.exe /I "C:\Your.msi" /QN /L*V "C:\msilog.log"

参数快速说明:

/I = run install sequence
/QN = run completely silently
/L*V "C:\msilog.log" = verbose logging at specified path

这篇关于如何创建一个简单地将目录复制到 Program Files 的 MSI 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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