I have a product installer built on WinForms, it's not an installer project because it needs to do lots of specific things, like installing other programs, running python scripts, decompressing files, etc.
So the problem is this installer requires framework 4, but when framework is not found, the user gets a way too generic message alo开发者_开发技巧ng the lines of "An unexpected error occurred.", so I was wondering if there was any way to modify this message, or some other work-around for this.
I obviously don't want to distribute an installer for my installer, because that would be so counter-intuitive too...
You should distribute .Net framework with your application.
Beside using a bootsrapper you could try using a tool like IExpress or another self extracting toolkit.
You could set the self extracting file to run the .Net Framework installer, you can also find the online installer if you want a lite install, and as a post install step to run your main installation. If the .Net framework is installed the first installer should not install anything
Other free tool that you can use to create a self extracting file would be 7-Zip.
If your concerne is only to trap this exception and make it another one less generic or so, you might be interested in the Enterprise Library Exception Handling Application Block.
Have you considered installing the prerequisites i.e bootstrapping?
精彩评论