3

I asked this question at stackoverflow but I was referred here.

I have a server which I will store the installers of the programs I want to install to the client PCs.

The client PC will download the programs that are not installed on it via a script (batch or whatever doesn't matter) and then install them silently/unattended.

And that's the problem. How am I going to do an unattended install when many installers do not provide command line arguments?

Any suggestions?

George
  • 41
  • 2

3 Answers3

5

Most Windows installers were created with packagers that do have undocumented command line switches; you just need to trial and error them. I usually use this page to get a list of common switches.

For example, you have an installer for the program "Example" and the installer is "Example_install.exe." The vendor doesn't provide any command line switches and perhaps even gives you an odd look when you ask for them. ;)

Download "example_install.exe" to the C:\temp folder on a test machine and open an administrative command line there.

Type things like:

example_install.exe /a
example_install.exe /q
example_install.exe /s /v"/qb"
example_install.exe /s /a /s /v"/qb"
example_install.exe /sp- /silent /norestart
example_install.exe /s /a /s /sms
example_install.exe /verysilent /norestart

If one of those switches "catches" and starts a silent install, you can use it to create a startup script. (If you're deploying this through AD, you can include a check beforehand to see if it's already installed to prevent it from installing every time the machine boots--even a simple test-path might do it.)

Shortcut: Some installers (notably java) also extract a bunch of msi files in appdata or some equivalent temporary location. If so, grab those and use those instead of throwing random switches at the wall and seeing if something sticks.

This doesn't always work, but it works more often than you'd think. Good luck!

Katherine Villyard
  • 18,550
  • 4
  • 37
  • 59
  • Thanks for your answer! I'm aware of the page that you referred me. You're right, it will work many times but not every time. And that's where monitoring comes in handy. – George Jul 10 '15 at 23:16
1

You need to create your own installer packages if the existing ones don't meet your needs. There are many products out there to help one doing this. I will not turn this into an elaborate answer but encourage you to google "Windows Installer Package Manager". Here is a short list of products, and here is a specific one describing how to use it to turn an existing installer into a silent one.

Note that if the installers are already packaged in an msi or an msp container, you can run it using msiexec to modify the behaviour at runtime, the /qn (or /quiet) switches are for silent installation for instance.

ErikE
  • 4,746
  • 1
  • 20
  • 27
  • thanks for your answer! Before i post this question I tried a free exe to msi converter but it didn't work most of the times. However the one you proposed monitors the installation and it should work I'll check it out. – George Jul 09 '15 at 21:48
1

To complement Katherine's answer...

Some executable installers are just wrappers for Microsoft installer files (MSI).

I've been pleasantly surprised in the past when I've used 7-zip to extract the contents of an exectuable to find an MSI. Most of the time this is enough to get an application installed.

iTunes is an example of this, though it's more complicated so there's a how-to. I'm sure there are similar examples.

john
  • 1,995
  • 2
  • 17
  • 30