Need to perform a complex install? Maybe ask a custom GUI. Can't get round the installer v2 functionality? Then cheat...
Our main application runs in three services. Any idea how incredibly irritating it is to type the username, password and password again, every time you need to update the code for testing? Well I had to do it three times, yes that's 3 users and 6 passwords, per install/code change. Time for an installer. I needed to be able to get the user/password from the user at install time and therefore set
serviceProcessInstaller1.Username = xxx.ServiceUser;
serviceProcessInstaller1.Password = xxx.ServicePassword;
And so to the cheat.
What I have done is to create a singleton class, which on its instantion, shows a form to ask for the details. Clicking OK terminates the form and completes the constructor. So the lines below now capture the details in the first line and can then distribute the data to any installer that wants them, no matter in which order they get called.
serviceProcessInstaller1.Username = InstallerGetDetails.Instance.ServiceUser;
serviceProcessInstaller1.Password = InstallerGetDetails.Instance.ServicePassword;
Hopefully you think thats neat.
Update: Hold on... Didn't the Community Server installer just do this very same thing :)