-2

I am in the process of automating the installation of different programs on a Windows system. I am having a hard time getting programs that end in .EXE to run on their own but I am able to have scripts that end in .MSI run with the appropriate switches.

  1. I am not in a position to download additional software to accomplish this goal.
  2. In the command Prompt I would enter: "\temp\Notepad++\Current Installer\npp current installer.exe" /(? or h or help) to see what switches were available.

I expect the program to install and that the batch script that contains this process, proceeds to close on its own. Instead the process requires user input and is a manual process rather than automatic.

aschipfl
  • 33,626
  • 12
  • 54
  • 99
Augusta4
  • 21
  • 2
  • 7
  • Please improve the title by replacing ".exe" with "installation program". I'm afraid there does not exist a universal solution as the installation program has to support it. – U. Windl Jul 23 '19 at 21:56
  • **`1)`** [Some info on deploying setup.exe and other packages](https://stackoverflow.com/questions/53289402/silent-run-installer-exe-with-parameters-on-windows/53296461#53296461). **`2)`** [Extract MSI from setup.exe](https://stackoverflow.com/questions/1547809/extract-msi-from-exe/24987512#24987512). **`3)`** [MSI Administative Installation](https://stackoverflow.com/questions/5564619/what-is-the-purpose-of-administrative-installation-initiated-using-msiexec-a/5751980#5751980). – Stein Åsmul Jul 23 '19 at 22:07

1 Answers1

0

So, this is my code for automation installation, .exe installation doesn't have an silence mode, even if the program show you the command, i try for hours install an skype.exe, with the command /SILENCE, and never works, but with the msiexec command, and the .msi works, nothing apears, install by own and close when finish. Somethings are in my language. msiexec /i Skype.msi /q --> /q set the silence mode.

title Pacote de Instalacao

cls             
@echo off
@echo **************************************************************
@echo ********                                              ********
@echo ********                 Pacote Padrao                ********
@echo ********                                              ********
@echo **************************************************************
pause

:menu
@echo off
@echo Usuario:%username% 
@echo Dominio:%userdomain% 
@echo Data:%date%               
echo **************************************************************
echo ** 1 - Instalar o Skype                                     **
echo ** 2 - Instalar o Adobe Reader                              **
echo ** 3 - Instalar o Firefox                                   **
echo ** 4 - Instalar o Chrome                                    **                                  
echo ** 5 - Instalar o Office16                                  **
echo ** 6 - Instalar o Office16                                  **                
echo ** 7 - Pacote Completo                                      **
echo ** 8 - Pacote Sem Firefox                                   **
echo ** 9 - Sair                                                 **             
echo **************************************************************

choice /c 1234567890 /m "O que deseja instalar?"

IF errorlevel==9 goto Sair
IF errorlevel==8 goto Completo2
IF errorlevel==7 goto Completo1
IF errorlevel==6 goto Office16
IF errorlevel==5 goto Office10
IF errorlevel==4 goto Chrome
IF errorlevel==3 goto Firefox
IF errorlevel==2 goto Adobe
IF errorlevel==1 goto Skype

:Skype
msiexec /i Skype.msi /q
Cls
goto menu               

:AcroRead
msiexec /i AcroRead.msi /q
Cls
goto menu

:Firefox
msiexec /i Firefox.msi /q
Cls
goto menu

:Chrome
msiexec /i Chrome.msi /q
Cls
goto menu

:Completo1
msiexec /i Skype.msi /q
msiexec /i AcroRead.msi /q
msiexec /i Firefox.msi /q               
msiexec /i Chrome.msi /q
msiexec /i Trend.msi /q

pause
set /p a=Deseja instalar o Office?(S\N).
IF %a% GEQ "S" (goto S1)
IF %a% GEQ "N" (exit)

:Completo2
msiexec /i Skype.msi /q
msiexec /i AcroRead.msi /q
msiexec /i Chrome.msi /q

pause
set /p a=Deseja instalar o Office?(S\N).
IF %a% GEQ "S" (goto S1)
IF %a% GEQ "N" (exit)

:S1
echo ** 1 - Instalar o Office16
echo ** 2 - Instalar o Office10

choice /c 12 /m "Deseja instalar qual office?"

IF errorlevel==2 goto Office10
IF errorlevel==1 goto Office16

:Office10
start E:\Pasta\Office10\setup.exe     
Cls

:Office16
start E:\Pasta\Office16\setup.exe     
Cls

:Sair
Exit

pause
@echo Fim do Script