简体   繁体   English

创建安装程序:从注册表项(类似于wix / installshield / nsis)读取要安装到的路径

[英]Create an installer program: read a path to install to, from registry key (something like wix/installshield/nsis)

I would like to create an installer of my program. 我想创建一个程序安装程序。 However because the installation is quite complicated, I need something more advanced than installshield limited edition. 但是因为安装非常复杂,我需要比installshield限量版更先进的东西。

  1. I have to run another installer from my current one. 我必须从我当前的安装程序运行另一个安装程序。 It doesn't matter if the user press "cancel" or installs the program, I just need to run it. 如果用户按“取消”或安装程序无关紧要,我只需要运行它。

  2. I have to install a directory structure on user computer which has a lot of files, that's why i'm going mad with wix: 100 files and I should write all of them with my hands in that xml file? 我必须在用户计算机上安装一个目录结构,其中有很多文件,这就是为什么我会厌倦wix:100个文件,我应该用我的双手写入xml文件中的所有文件? Are we mad? 我们生气了吗?

  3. I have to install files from point 2 into a registry key. 我必须将第2点的文件安装到注册表项中。 That's why I was using wix 这就是我使用wix的原因

I played with nsis long time ago and I liked it, but the language is not so nice. 我很久以前和nsis一起玩过,我很喜欢它,但语言不太好。

Wix has "similar" problem. Wix有“类似”的问题。 I would love using something like C# and things like that otherwise I'll stick with wix but I need a way to add files faster to xml file, can't add 100 files manually. 我喜欢使用像C#这样的东西,否则我会坚持使用wix,但我需要一种方法来更快地添加文件到xml文件,不能手动添加100个文件。

Any suggestion? 有什么建议吗?

You can give Advanced Installer a try. 您可以尝试使用Advanced Installer It has folder synchronization, which means it can batch add contents of folders, with the possibility to filter out certain file name patterns, for example you'd want to filter *.pdb files and add all the rest to the project automatically. 它具有文件夹同步功能,这意味着它可以批量添加文件夹的内容,并可以过滤掉某些文件名模式,例如,您希望过滤* .pdb文件并自动将所有其余文件添加到项目中。

I use it myself and never had a problem. 我自己使用它,从来没有遇到过问题。

Wix Heat可以为您生成wxs源文件。

You should look at InnoSetup . 你应该看看InnoSetup It has an IDE available that allows drag and drop of files (and multiple select in a file selection dialog), can launch other applications (including additional setup files), create and modify registry settings, and supports pretty complex scripting if needed. 它有一个IDE,允许拖放文件(和文件选择对话框中的多个选择),可以启动其他应用程序(包括其他安装文件),创建和修改注册表设置,并支持非常复杂的脚本(如果需要)。 It's pretty easy to use, and the documentation is pretty good. 它非常易于使用, 文档非常好。 It comes with pretty comprehensive sample installations, too. 它还配备了非常全面的样本安装。

The installation scripts are created by the IDE and then compiled into an installer, so the script source is editable by hand if needed. 安装脚本由IDE创建,然后编译到安装程序中,因此如果需要,可以手动编辑脚本源。 It's also not XML, but more like an INI file, so it's a little easier to work with manually as well. 它也不是XML,但更像是INI文件,因此手动操作也更容易一些。

Best of all it's free, and so is the IDE. 最重要的是它是免费的,IDE也是如此。

I would go back to using NSIS, if you use the HMNSIS editor http://hmne.sourceforge.net/ to write your scripts you can use the Wizard mode to make a list of the files and directory structure you will use in your installer. 我会回到使用NSIS,如果您使用HMNSIS编辑器http://hmne.sourceforge.net/编写脚本,您可以使用向导模式列出您将在安装程序中使用的文件和目录结构。

Running other installers and registry settings are also easily done with NSIS. 使用NSIS也可以轻松地运行其他安装程序和注册表设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM