How do I create an unattended installation where I donโ€™t need to click Next?

I am trying to make a silent installation of.exe, which I download. The boot method does not matter, since it has nothing to do with the installation.

However, when he completed the download and I started the process, instead of setting it the way I want (without pressing the next button), it simply opens the UAC, asking for administrative privileges. When I click YES, it opens.exe, and I have to install it manually.

Is there any way to install it the way I want?

Process process = new Process(); process.StartInfo.FileName = @"C:\PATH\Setup.exe"; process.StartInfo.Arguments = "/quiet"; process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; process.Start(); process.WaitForExit(); 
+5
source share
3 answers

Silent exe installation is not easy. The easiest way is to use the msi package for this. Therefore, you need to extract msi from exe and call it with one of the following parameters:

  • full user interface: / qf (this is the default option)
  • reduced UI: / qr (user interface does not show any wizard dialogs)
  • base interface: / qb, / passive (only a progress bar will be displayed during installation)
  • no UI: / qn, / quiet (during installation, the user interface will not be displayed)

In Windows Vista and above, to install the package without problems, the installation package must be upgraded. Therefore, the parent process that calls setup.exe must start as an administrator.

If you want to install exe silently, there is still a lot to do. But it depends on what type of installation package you are trying to install. Find out what the installer software with which the package was created is, and then review the documentation that is included in the package. You need to look for command line arguments in the documentation, which allows you to run exe without problems, if possible. In addition, you need to find out if the package is installed for both the user and the machine, since different permissions determine the type of mark.

+1
source

If you cannot package the original installer in MSI, then you can always take a look at Auto IT ( https://www.autoitscript.com/site/autoit/ )

AutoIt v3 is a free BASIC-based scripting language designed to automate the Windows GUI and general script. It uses a combination of simulated keystrokes, mouse movements, and window / control manipulation to automate tasks in a way that is impossible or reliable to use in other languages โ€‹โ€‹(like VBScript and SendKeys). AutoIt is also very small, standalone and will run on all versions of Windows out of the box without any annoying โ€œdeadlinesโ€!

Using this, you can play and click the "Next" button to automatically click on the merits, reaching your goal.

0
source

If your installer is InstallShield, you can use this command: setup.exe /s /v/qb for a silent installation with a basic MSI interface or setup.exe /s /v/qn for a silent installation without any interface. Take a look at this question fooobar.com/questions/1266112 / ... This may help.

0
source

Source: https://habr.com/ru/post/1266111/


All Articles