Make my own Installer from C#?
I've been quite liking the new Installer's Microsoft have used, mainly for their Blend installations which use WPF, I'm wondering if I can make something like this for my application?
The main worries are creating the Program Files Directory and registering the application with Windows so it adds it to the add/remove applications list.
Is there anyone with a bit of experience on this?
Thanks
Microsoft have been using WiX with several of their installers and have managed to create some pretty funky, user friendly and accessible user interfaces. Examples of which include SQL Server and Microsoft Office.
It sounds like your installer doesn't need to do too much to the system, create a program files directory and install some files there. You are best off using Windows Installer to handle this, this is what it is built for, rather than rolling your own. You will get all of the functionality for coping with failures and rolling back safely out of the box. The effort required to create a basic installer in WiX is truly minimal and adding a basic GUI is just as easy.
You really should use a Windows Installer based tool because MSI does a lot of things write. Things you'll be trying to learn from scratch ( for example you don't know about the Uninstall key in the registry and MsiPublishProduct does this for you ). If you want to work your chops on WPF you can always take your working installer ( let's say WiX ) and work up your own external UI handler using DTF and WPF.
链接地址: http://www.djcxy.com/p/47076.html下一篇: 从C#做我自己的安装程序?