3

I developed a custom installer application because the Visual Studio Setup Projects is not sufficient customizable to fit my needs. I developed a validator and an Installer for Prerequisites like .NET framework, SQL Server, but I'm unable to start some executables like the one from .NET framework using Process.Start.

I wonder to know if there is a custom validator and installer for prerequisites or a way to do the prerequisites installation and validation different from develop one myself :).

Thanks in advance.
Paulo

Paulo
  • 609
  • 1
  • 11
  • 27
  • Why are you not able to start the installer? And what is the reason you didn't choose an existing installer tool such as WiX or NSIS? – Dirk Vollmar Oct 29 '10 at 14:37

2 Answers2

0

Why exactly is Process.Start() not working for you? In the absence of that knowledge, I can only describe the situation I encountered when trying to kick off the .NET installer.

If a UAC dialog is appearing, requesting admin privileges, there is no way to avoid requiring your user to click it. Any non-elevated installation process, including a professional third-party solution, will encounter the UAC dialog when attempting to start the .NET installer. This is because the .NET installer requires an elevated administrator token to run. You can't get around that.

Dealing with a background UAC dialog was what I encountered. It would blink silently and be overlooked by users who probably thought the installer had frozen and gave up on it entirely. I just spent 2 weeks working on this issue. It only happened if the user clicked outside the installer window between the installer starting and the UAC dialog appearing. Doing so makes Windows think the user wants to work on something else, and keeps the window he clicked on active. Windows is designed to inhibit "focus stealing", so there aren't any official ways of "grabbing" focus back for your window (i.e. for the UAC dialog your process started).

It's safe to assume that the window your users click on aren't owned by you, so the official Windows methods (having the window with focus grant permission to your process to grab focus) won't work for this situation. This is where it would be nice if msiexec.exe had the ability to keep its windows top-level.

So at this point, if you are encountering what I encountered, then there aren't any simple and Microsoft supported solutions to it of which I am aware.

But perhaps you are running into something else? Again, please update your question with more details so we can give you a better answer.

Changing installation IDEs, as another user suggested, no matter how good the target IDE, is a big step. And as much as I cannot recommend using Visual Studio to develop MSI files, I would consider moving to another IDE only if you should continue encountering problems doing what you want to accomplish. So far however you have described only a localized problem to resolve, and one that may not be resolved by using another tool.

user3454591
  • 331
  • 3
  • 5
0

I strongly suggest you have a look at http://nsis.sourceforge.net/Main_Page. This is an open source installation tool which I've used for exactly the tasks you're looking for, and has a significant community.

Pieter van Ginkel
  • 29,160
  • 8
  • 71
  • 111