Setup installation using batch files

winprofessional 41 Reputation points
2021-03-11T19:00:53.117+00:00

I am trying to install a setup exe from a batch file in silent mode. I am using the below command:

Setup.exe /S /v/qn /w

The installation is working fine.

If an old version is already installed, then is there any options/switches to handle that? If already an older version of the application is already installed and the Setup.exe is newer version , then the newer version should be installed. Any options for that? If a newer version than Setup.exe is already installed, then that should remain intact.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,657 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. MotoX80 31,656 Reputation points
    2021-03-11T22:16:13.983+00:00

    and the Setup.exe is newer version

    It's not a question of setup.exe being a newer version, it's the software being installed and really a question of how the vendor configured the installer to handle previous versions.

    You really need to contact the vendor for whatever software you are installing.

    0 comments No comments

  2. Carl Fan 6,836 Reputation points
    2021-03-12T07:39:22.997+00:00

    Hi,
    As far as I know, we always could use msiexec command to install or uninstall msi (not exe) application.
    Silently install the msi package:
    msiexec /i C:\setup.msi /qn
    Silently uninstall the msi package:
    msiexec /x C:\setup.msi /qn
    For .exe app, setup /S /V"/qn" could be work. But if we want to install the newer version. This is equivalent to a process of upgrade. This application might have some of its own Settings such as Product Code. Therefore, I would like suggest to contact the manufacturer of the program to see if they can provide a good upgrade program solution by using BATCH file.
    Hope this helps and please help to accept as Answer if the response is useful.
    Best Regards,
    Carl

    0 comments No comments