Feb-06-2020, 07:16 AM
from pywinauto import application
app = application.Application()
app.start("Notepad.exe")
The above code launches a notepad.
But when I try to run this 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")
Traceback (most recent call last):
File "C:\Users\km041320\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\km041320\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.')
app = application.Application()
app.start("Notepad.exe")
The above code launches a notepad.
But when I try to run this 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")
Traceback (most recent call last):
File "C:\Users\km041320\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\km041320\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.')
User has been warned for this post. Reason: Not following directions after repeatedly informed