from pywinauto import application app = application.Application() app.start("Notepad.exe")The above code launches a notepad.
But when I try to run this.It throws and error and fails to launch the executable
from pywinauto import application app = application.Application() app.start("C:\Program Files\Microsoft Assessment and Planning Toolkit\bin\MapToolkit.exe")
Error:Traceback (most recent call last):
File "C:\Users\ABCD\AppData\Local\Continuum\anaconda3\lib\site-packages\pywinauto\application.py", line 1047, in start
start_info) # STARTUPINFO structure.
pywintypes.error: (2, 'CreateProcess', 'The system cannot find the file specified.')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\ABCD\AppData\Local\Continuum\anaconda3\lib\site-packages\pywinauto\application.py", line 1052, in start
raise AppStartError(message)
pywinauto.application.AppStartError: Could not create the process "C:\Program Files\Microsoft Assessment and Planning Toolkiin\MapToolkit.exe"
Error returned by CreateProcess: (2, 'CreateProcess', 'The system cannot find the file specified.')