Create an installer program: read a path to instal

2020-04-16 04:14发布

问题:

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.

  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? Are we mad?

  3. I have to install files from point 2 into a registry key. That's why I was using wix

I played with nsis long time ago and I liked it, but the language is not so nice.

Wix has "similar" problem. 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.

Any suggestion?

回答1:

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.

Running other installers and registry settings are also easily done with NSIS.



回答2:

You can give Advanced Installer a try. 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.

I use it myself and never had a problem.



回答3:

Wix Heat can generate the wxs source files for you.



回答4:

You should look at 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. 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. It's also not XML, but more like an INI file, so it's a little easier to work with manually as well.

Best of all it's free, and so is the IDE.