0

I'm trying to write a script which downloads and installs notepad++ on windows, unfortunately, I can't find a way to install notepad++ automatically. I used:

from pywinauto.application import Application
fsv =Application(backend="uia").start("notepad++.exe")
fsv.InstallDialog.NextButton.wait('ready', timeout=30).click_input()
fsv.InstallDialog.IAgreeRadioButton.wait('ready', timeout=30).click_input()
fsv.InstallDialog.Edit.Wait('ready', timeout=30).type_keys(os.getcwd() + "\Notepad++", with_spaces=True)
fsv.InstallDialog.InstallButton.wait('ready', timeout=30).click_input()
fsv.InstallDialog.FinishButton.wait('ready', timeout=30).click_input()
sophros
  • 14,672
  • 11
  • 46
  • 75
  • Possible duplicate of [Python - Control window with pywinauto while the window is minimized or hidden](https://stackoverflow.com/questions/32846550/python-control-window-with-pywinauto-while-the-window-is-minimized-or-hidden) – Vasily Ryabov Jul 18 '19 at 19:09
  • Also Notepad++ installer should have silent option like `-s` to operate without GUI. Just start the installer in `cmd.exe` with `/?` parameter to get help for all options. – Vasily Ryabov Jul 18 '19 at 19:11

0 Answers0