How do I create an unattended installer for various applications in Windows?

32,338

Solution 1

This is dependent on what programs you wish to install. There are various installer systems out there (NSIS, MSI, Installshield, ... off the top of my head) and each will usually have command-line switches you can use to perform a silent installation. For Microsoft Installer packages (MSI), there is the /q switch to perform an installation without a GUI. So a sample line may look like this:

"E:\Microsoft.NET\netfx.msi" /q

Instead of making batch scripts there are easier tools to make a custom, unattended Windows installation that will prepare all your software for you. NLite and the MSFN Unattended Guide come to mind.

Another alternative is to make a full backup after all your desired programs are installed and configured using Norton Ghost or Acronis True Image. I always end up kicking myself with this solution though. Right after I think everything's fine and I perform a backup, there's always 1 piece of software I forget to install.

Solution 2

I've had a lot of luck with Ninite - it has 95% of the programs I need and uses a single custom package to install them all.

Solution 3

This site has detailed, exhaustive information about unattended install of Windows. Specifically:

  • How to add 3rd party applications to the install
  • How to automate installers that don't have a "silent" switch
  • Plenty of examples and step-by-step instructions with illustrations

I have linked to the page specific to adding 3rd party apps, but be sure to check out the rest of the guide.

Solution 4

I like to use AutoIt. Usually I just use switches if the installer supports it. Universal Silent Switch Finder (USSF) is a good small tool to let you know which switches an installer takes. USSF can be found on SoftPedia.

With AutoIt what you would do is create a script that simulates key presses/mouse clicks. For example, in the script you would tell it to run ccleaner.exe, wait for the window to be active, select the next button/send "enter" key press, etc. (Or use /S switch)

If you only need one file (Like if you are making nLite addons) then I never successfully used AutoIt by itself, as there would be two files in the package. So I just use an SFX (Self Extracting Archive) to add the AutoIt script and setup file into one file.

By the way, AutoIt's help file is very informative. You will find great examples and explanations in it, if you should choose to use it. Hope this helps you

Edit: Also, you can compile AutoIt scripts to an .exe. That means no need to have AutoIt installed to use the scripts.

Share:
32,338

Related videos on Youtube

Offlein
Author by

Offlein

Updated on September 17, 2022

Comments

  • Offlein
    Offlein over 1 year

    I have had to reinstall my operating system today and there a ton of programs that I need to install, not to mention quite a few configurations to make after installing them!

    I heard some people are using batch files to automate this process with unattended installers.

    Is there a program that can generate a batch script for the executable files you hand to it? (If there isn't one, there should be.)

    How would I go about writing a batch file for an unattended installer?

  • Joey
    Joey over 14 years
    WiX is just a build system for MSI.
  • John T
    John T over 14 years
    Knew it had something to do with it haha, theres tons of them.
  • user66001
    user66001 almost 11 years
    Universal Silent Switch Finder (USSF) sounds like a great tool - Do you have a homepage/download link for it?
  • user66001
    user66001 almost 11 years
    Thanks Leftium. Info looks very helpful. Any chance you could edit your answer to include some/all of it, so that if the link dies, the information is still available?
  • user66001
    user66001 almost 11 years
    NOTE: Per superuser.com/questions/246639/… the /q switch can be disabled by MSI designers.
  • Leftium
    Leftium almost 11 years
  • user66001
    user66001 almost 11 years
    Was just thinking along the lines of superuser.com/questions/31811/…