title: Python - Control window with pywinauto while the window is minimized or hidden
body: <p><strong>What I'm trying to do:</strong></p>
  
  <p>I'm trying to create a script in python with pywinauto to automatically install notepad++ in the background (hidden or minimized), notepad++ is just an example since I will edit it to work with other software.</p>
  
  <p><strong>Problem:</strong></p>
  
  <p>The problem is that I want to do it while the installer is hidden or minimized, but if I move my mouse the script will stop working.</p>
  
  <p><strong>Question:</strong></p>
  
  <p>How can I execute this script and make it work, while the notepad++ installer is hidden or minimized.</p>
  
  <p><strong>This is my code so far</strong>:</p>
  
  <pre><code>import sys, os, pywinauto
  
  pwa_app = pywinauto.application.Application()
  
  app = pywinauto.Application().Start(r'npp.6.8.3.Installer.exe')
  
  Wizard = app['Installer Language']
  
  Wizard.NextButton.Click()
  
  Wizard = app['Notepad++ v6.8.3 Setup']
  
  Wizard.Wait('visible')
  
  Wizard['Welcome to the Notepad++ v6.8.3 Setup'].Wait('ready')
  Wizard.NextButton.Click()
  
  Wizard['License Agreement'].Wait('ready')
  Wizard['I &amp;Agree'].Click()
  
  Wizard['Choose Install Location'].Wait('ready')
  Wizard.Button2.Click()
  
  Wizard['Choose Components'].Wait('ready')
  Wizard.Button2.Click()
  
  Wizard['Create Shortcut on Desktop'].Wait('enabled').CheckByClick()
  Wizard.Install.Click()
  
  Wizard['Completing the Notepad++ v6.8.3 Setup'].Wait('ready', timeout=30)
  Wizard['CheckBox'].Wait('enabled').Click()
  Wizard.Finish.Click()
  Wizard.WaitNot('visible')
  </code></pre>