Answers: <p>The installation of Windows application can be automated using <a href="https://autohotkey.com/" rel="nofollow noreferrer">AutoHotkey</a> (AHK), similar as <a href="https://github.com/Winetricks/winetricks/blob/master/src/winetricks" rel="nofollow noreferrer">Winetricks</a> does this for all common apps which support.</p>
  
  <p>Here is example of AHK script which aims to install mentioned application:</p>
  
  <pre><code>Run, mt5setup.exe
  WinWait, MetaTrader 5 Setup
  ControlClick, Button1
  Sleep 100
  ControlClick, Button3
  WinWait, MetaTrader 5 Setup, Installation successfully completed
  ControlClick, Button4
  Process, Wait, terminal.exe
  Process, Close, terminal.exe
  </code></pre>
  
  <p>To integrate it with CI, AHK needs to be installed by downloading ZIP file, uncompressing it and passing the above AHK script. Suggested <code>appveyor.yml</code> file:</p>
  
  <pre><code>install:
  - curl -sLo https://www.metatrader5.com/en/download
  - curl -sLo http://www.autohotkey.com/download/AutoHotkey104805.zip
  - unzip *.zip
  before_test:
  - dir
  test_script:
  - AutoHotkey.exe install.ahk
  build: off
  platform: x86
  </code></pre>
  
  <p>where <code>install.ahk</code> is the file to contain above AHK script which can be dynamically generated or downloaded from some repository.</p>
  
Answers: CC BY-SA 3.0
Answers: 2017-03-01T13:56:49.463Z
Answers: 2017-10-22T13:51:49.877Z
Answers: 2017-10-22T13:51:49.877Z
Answers: kenorb
Body: <p>I've the installer in EXE format (<a href="https://www.metatrader5.com/en/download" rel="noreferrer"><code>mt5setup.exe</code></a>) and I'd like to download it and automate the installation process on Appveyor CI. On Linux I would normally use <a href="http://www.semicomplete.com/projects/xdotool/" rel="noreferrer">xdotool</a>.</p>
  
  <p>Since this installer doesn't have any silent flags to use, how can I automate the installation process headlessly?</p>
  
Comments: CC BY-SA 3.0
Comments: 2017-02-28T17:39:56.623Z
Comments: Best idea coming to my mind: https://www.autoitscript.com/site/autoit/ (but out of this, writing this as an answer would be too long or link only)
Comments: Tensibai
Comments: CC BY-SA 3.0
Comments: 2017-02-28T17:40:37.413Z
Comments: Brief answer how to use it would be fine.
Comments: kenorb
Comments: CC BY-SA 3.0
Comments: 2017-02-28T17:42:55.310Z
Comments: There's no brief answer, this mean watching the install and writing the script, the tool examples are good I think and just quoting the doc doesn't sound an answer to me :/.
Comments: Tensibai
Comments: CC BY-SA 3.0
Comments: 2017-02-28T17:44:51.333Z
Comments: And another option could be https://chocolatey.org/ (again, answering mean installing your linked software or quoting the doc.
Comments: Tensibai
Tags: <automation><appveyor><installation>
Title: How to automate installation of Windows installer on Appveyor CI?
UserDisplayName: kenorb
ThreadText: # How to automate installation of Windows installer on Appveyor CI?
  
  (Asked by: username_0 on 2017-02-28)
  
  I've the installer in EXE format ([`mt5setup.exe`](https://www.metatrader5.com/en/download)) and I'd like to download it and automate the installation process on Appveyor CI. On Linux I would normally use [xdotool](http://www.semicomplete.com/projects/xdotool/).
  
  Since this installer doesn't have any silent flags to use, how can I automate the installation process headlessly?
  
  **Tags:** automation, appveyor, installation
  
  > **Comments:**
  > **username_1**: Best idea coming to my mind: https://www.autoitscript.com/site/autoit/ (but out of this, writing this as an answer would be too long or link only)  
  > **username_0**: Brief answer how to use it would be fine.  
  > **username_1**: There's no brief answer, this mean watching the install and writing the script, the tool examples are good I think and just quoting the doc doesn't sound an answer to me :/.  
  > **username_1**: And another option could be https://chocolatey.org/ (again, answering mean installing your linked software or quoting the doc.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-03-01. Score: 4 | Accepted answer
  
  The installation of Windows application can be automated using [AutoHotkey](https://autohotkey.com/) (AHK), similar as [Winetricks](https://github.com/Winetricks/winetricks/blob/master/src/winetricks) does this for all common apps which support.
  
  Here is example of AHK script which aims to install mentioned application:
  
  ```
  Run, mt5setup.exe
  WinWait, MetaTrader 5 Setup
  ControlClick, Button1
  Sleep 100
  ControlClick, Button3
  WinWait, MetaTrader 5 Setup, Installation successfully completed
  ControlClick, Button4
  Process, Wait, terminal.exe
  Process, Close, terminal.exe
  
  ```
  
  To integrate it with CI, AHK needs to be installed by downloading ZIP file, uncompressing it and passing the above AHK script. Suggested `appveyor.yml` file:
  
  ```
  install:
  - curl -sLo https://www.metatrader5.com/en/download
  - curl -sLo http://www.autohotkey.com/download/AutoHotkey104805.zip
  - unzip *.zip
  before_test:
  - dir
  test_script:
  - AutoHotkey.exe install.ahk
  build: off
  platform: x86
  
  ```
  
  where `install.ahk` is the file to contain above AHK script which can be dynamically generated or downloaded from some repository.
  
  
  ---
  
  