I am working on executing an exe file (notepad.exe) inside windows container using python.
I have copied these in my container:
exe file
dockerfile that calls python script
python script that runs exe
When I build and run these, Its not showing any error. But, the exe is also not running. Am I doing anything wrong? Can notepad.exe open in host machine or do I have to check the processlist in container to check whether it is running or not?
import os
print(“working”)
os.startfile(“notepad.exe”)
print(“successful”)
As notepad is not opening, I thought that it is not executing. Actually, I want to execute an exe file and take the memory dump of Windows container. Can you please tell me what to do for getting the memory dump? Also,how will I know that the exe is executing or not?
Make sure you have notepad.exe in Your Win container, and specify full path like os.startfile(“C:\windows\system32\notepad.exe”)
If there isn’t copy to the image.
Yes. But, its showing the error FileNotFoundError: [WinError 2] The system cannot find the file specified:
I am executing the docker commands in the powershell and the path is set as E:\input\Automation(as shown in the above screenshot). That path has all files. So, is it mandatory to give the full path? When I don’t give any path, it’s not showing any error.