In testing my company's software I do a lot of installations (an .exe file), configurations (two web.config files) and uninstallations on a few servers (Windows Server 2008) during a given release.

My question: Is it possible to automate this process, ie. the excecution of the .exe and configuration of the web.config files (simple text edits)? If so how?

(This is more for saving time than for checking if in the install procedure works correctly.)

  • Looks like there is a program called WinTask that might work. Would PowerShell work? – Chris Kenst Mar 23 '12 at 1:42
  • 1
    What kind of installer does your company's software use, e.g. InstallShield or WinInstall? – user246 Mar 23 '12 at 1:45
  • It's the installer built into Visual Studio 2010. (Not sure what the name is.) – Chris Kenst Mar 23 '12 at 5:18
  • For configurations task I'd recommend to look at so called Web.config transformations, I've found it quite useful OR just to track each web.config for each configuration.
  • For installation tasks(if you're working in Windows-only environment) I could suggest PsExec for remote launching installations(for *.msi via msiexec and *.exe's as is)

For putting everything together in single executin sequence I'd suggest Nant.
WinTask for scheduling(as guys already mentioned) or Quartz for .NET(the last one is very powerful but requires writing code in c# or other .net programming language).

Hope this helps


Many test automation tools could also automate the installation of the software under test.

In a previous company, the Buildmaster worked for me. He was responsible for producing the weekly build of our software. At the end of the automated build process, a script executed which installed the software on a set of test servers, initialized the database, executed a Smoke Test, and mailed a report of results.

I currently use WinTask for this sort of procedure, but many test automation tools can do the job as well.

  • Agreed. To facilitate automation, some installers can be run "silently", i.e. from the command line rather than via a GUI. I once wrote an automated process like the one Joe described, and it ran our installers silently. – user246 Mar 23 '12 at 13:36
  • We installed silently most of the time. And we also had a "test install" script that would install and configure it using the GUI like most of our customers did. – Joe Strazzere Mar 23 '12 at 13:51
  • I thought about running the installers from the command line, and then add it to a batch file or something. I'll have to play around with that. Joe do you have any experience with other tools besides WinTask? – Chris Kenst Mar 23 '12 at 21:14
  • Yes. As I said, many (probably most) test automation tools could also automate the installation of the software. And of course a batch file could do the same if your installer runs unattended from the command line. – Joe Strazzere Mar 29 '12 at 11:29

I would suggest Fabric:


to steal thier blurb:

Fabric is a Python (2.5 or higher) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.

It provides a basic suite of operations for executing local or remote shell commands (normally or via sudo) and uploading/downloading files, as well as auxiliary functionality such as prompting the running user for input, or aborting execution.

Edit - Added windows specific info

For fabric with windows have a look at the following:

I must admit that fabric is definetly more *nix orientated, but it is a valid option. I guess i've kind of got used to dealing with *nix servers mainly so my windows machines normally have bash/openssh installed.

  • I'm not as familiar with using Linux or Python which is why I slyly mention Windows Server. I suppose if I installed Cygwin or something it might work? – Chris Kenst Mar 23 '12 at 21:15
  • Added some windows specific info – Ardesco Mar 23 '12 at 21:42

If this is all command-line based, consider using a scripting language, such as Python or Perl. In Perl you can probably use the Expect library to handle the .exe prompt and do the file editing in Perl. To get Perl running in a windows environment, get a windows version here. You may also be interested in cygwin. Finally, if you need to run this automation remotely, check out the Net::SSH2::Expect module.


Have you tried executing the installer from the command line using /? Most installers will give you a list of supported parameters. Usually something like /Q installs the software quietly with default parameters and options. /l specifies a log file. Also, installers (depending on your situation) accept 'answer files'. These are usually just XML files that have answers to questions that the installer asks, such as location to install, even product keys, users to install for etc.

  • I haven't tried using the command line. Can you point to any examples? – Chris Kenst Apr 3 '12 at 17:04
  • Well try using your exe and append a /? at the end. It will give you possible options (most installers do). – Aniket Apr 11 '12 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.