I'm writing a perl program that basically use command line to open a program, does something with it, and close the program. And this will be in a loop. I have problem with closing the program. Just for an example,
system("notepad.exe");
.
.
(does something with notepad and saves the file to somewhere)
.
.
system("taskkill /im notepad.exe /f");
The notepad opens, but it doesn't close. And when i close it manually by clicking the X button, it says :
ERROR: The process "notepad.exe" not found.
any suggestions?
system("notepad.exe");
.
.
(does something with notepad and saves the file to somewhere)
.
.
system("taskkill /im notepad.exe /f");
The notepad opens, but it doesn't close. And when i close it manually by clicking the X button, it says :
ERROR: The process "notepad.exe" not found.
any suggestions?