Creating a script to run a exe silently without user interaction

Posted on 2014-08-22
Last Modified: 2014-09-07

I want to know if its possible to create a script to run an exe file silently without user interaction. I know you can do this with an MSI but is there a way to do this with an EXE file? I cant seem to get it to install silently.

Converting to MSI not optional.

Question by:Suk Singh
    LVL 8

    Assisted Solution

    Its depending of the creating the exe file if its implemented. Since UAC you can run on a systemuser so the user itself does not see it. A good ressource of this is itninja
    LVL 29

    Assisted Solution

    by:Olaf Doschke
    I assume you talk of a setup.exe. That depends on the software used to create it and what command line options it accepts.

    Eg Inno:

    So you have to know what type of installer and whether it allows it at all.

    Bye, Olaf.
    LVL 27

    Accepted Solution

    Many software installer executables have a /silent or /s switch if they're created with standard InstallShield or other installer packages.  A lot of open source software also accept either /s or /silent or both.  The Microsoft software including their patches use /q /norestart for most of theirs.  They standardized this several years ago around the time of Windows 7 or Vista.  They used to have two camps of switches.  Some software have undocumented switches.  Some software have licensing and configuration pop-ups that are more comlpex.  Microsoft Office can be installed if you add the answer file to set the Product key and the installation configurations.  I forget the exact place since I haven't done this for a few years, since I've been doing Unix & OSX instead.  Google is your friend.

    You can also manually install MSIs via the msiexec command.  They take the standard MicroSoft switches of /q (or /quiet) /norestart.  You should use the /norestart if you're going to run several patches or software installs, then reboot after everything is done.  If you're just doing one, you can skip it if you plan on restarting right away.

    Here's a database of silent installer switches that I've used for many, many years:  You don't have to use the WPKG tool to benefit from the site.  I've always just used it to look up the switches from the install line and run my own scripts.  There are a few that require more effort than and you can find it in the install section.  If it's not on the list, you'll have to experiment, but I've had luck with just guessing /s or /silent in the past.  These work well when your amateur Domain Admin breaks GP for installation, which has happened to me frequently enough in the past that I resorted to using this for immediate patching.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now