简体   繁体   中英

Is it bad practice to create a custom winforms app as an installer?

I can't find an installer on the market I like that's opensource or free. Sure I would love to use Install shield, but my project needs to finish under budget.

I was thinking about creating a custom win forms app to handle the install, is this acceptable practice. Or should I be creating a custom MSI?

If MSI is the route, what tools should I use?

Essentially I need to perform the following in the installer:

  1. Create an IIS Application
  2. Set permissions
  3. Install a console app
  4. Create a scheduled task

then when patching

  1. Replace bin dll's for IIS app

The built in installers provided by Microsoft are not flexible enough to creat self standing IIS applications.

MSI is the recommendation from Microsoft to install anything .

Sure there are simpler cases where xcopy deployment is fine, or where you can have your own installer. But In complex cases, users want the auditing and uninstall capabilities, the familiar UI, the pre-req checking (among other things) that comes with MSI.

You can customize the MSI-based install that is produced with Visual Studio.

I normally write scripts using Javascript to do the customization, and then set the Javascript script as a "custom install action".

替代文字

WiX具有Visual Studio集成功能,并且与内置的安装项目相比,它可以完全自定义的MSI构建器并不会太麻烦

If you can do it, then just create your own installer, as an executable. It could either download the file to be installed or they have downloaded a zip file and then run the executable, which will have all the files to use for the installation.

I have done that before, as I needed to do some steps that VS2003 couldn't do, and the users didn't seem to mind running the executable.

Just make certain you have some sort of version in a file or registry, so that you can tell if you need to update, as there may be some extra steps in updating between version 1.2 and 3.8, if some people don't update that often.

While your installing is running, make certain to give good information as to what you are doing and how far along you are, that will help people feel better.

您可以通过Visual Studio创建Windows Installer,并添加自定义操作以执行所需的操作

I have had good success with Inno Setup. It uses a pascal like language and has a GUI helper app called ISTool. It's free/OSS and well documented. I can't imagine having to write mine own installation program when there are so many options out there. Other tools that I've looked at are NSIS (already mentioned), WIX (Microsoft open sourced MSI building tool), and of course the VS Setup Project with custom scripts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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