2

I have a windows form application that I am trying to use as an all in on installer for a set of other tools I have. Each of these tools installs via an installer (by pressing next, finish, ect).

I want to know if there is a way to not only start the installation of those installers but also automatically click through them so that in one click I can have all the tools install themselves.

Is this possible through a windows forms application?

5
  • Did you write the other tools? Commented Feb 5, 2014 at 21:41
  • 2
    If they use msiexec, you can call command line parameter for silent installs. Commented Feb 5, 2014 at 21:49
  • Which installer are you using? Commented Feb 5, 2014 at 21:49
  • Happy guessworking here? Three answers, each one guarded by clauses if $isItThisCase then $doThat, because we can't be sure if the question really contains all the necessary informations. Commented Feb 5, 2014 at 22:04
  • Yes I created my own tools. The installers are made using WiX Toolset. Commented Feb 6, 2014 at 14:22

3 Answers 3

2

If the other tools are windows installer msi files, you can probably install them silently, see e.g Silent installation of a MSI package, so your application would launch processes by using Process.Start() to run msiexec.exe /qn firstSetup.msi and so on.

However, there is a much more elegant solution that

  • gives you a setup.exe for the full bundle
  • shows the bundle in add/remove programs so it can be removed.

The "Burn" tool included in the Windows Installer Xml Toolkit (WiX) . It allows you to specify a set of packges which can be executables, msi files etc. and installs them, acting like a single installer. The bundle setup can use a GUI (called a bootstrap application).

WiX ships with a standard bootstrapper application, http://wixtoolset.org/documentation/manual/v3/bundle/wixstdba/

But you can choose to make your own bootstrapper app as a WPF dll, examples: http://bryanpjohnston.com/2012/09/28/custom-wix-managed-bootstrapper-application/ http://neilsleightholm.blogspot.se/2012/10/wix-bootstrapper-application.html

The WiX project(s) even integrate with VS so you can build them straight in the IDE.

Sign up to request clarification or add additional context in comments.

Comments

1

Unless the installers for the other apps expose an API for automation, which is unlikely, then you would have to employ the Windows API to achieve your aim. You would have to use FindWindow to get the handle of the installer's top-level window, FindWindowEx to get the handle of appropriate child windows, e.g. text boxes and buttons, and then SendMessage to set text and click. This combination is very common so you would be able to find plenty of examples. The catch is that you'll actually have to run those installers multiple times to determine what windows you need to access and then test that your code works.

Comments

0

You can make a .bat file and run the tools installer while this parameter

/qb

This parameter setup the installer with defaults or with your presets. For example if you want to install .Net freamework you can do this :

START /qb /norestart dotnet\dotNetFx40.exe

Write your command in a .bat file and call it in your windows form application to setup.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.