
niyas.mohd
New User
Jan 19, 2010, 4:29 AM
Post #1 of 1
(3069 views)
|
Need help to auto kill the process!!!
|
Can't Post
|
|
Hi, I am doing a simple automation thru perl code by just running a exe then do some normal renaming of files. Please find the below code. "find.pl" #!/usr/bin/perl # Running my exe file. system "c:\\temp\\Search.exe"; print "hello"; system "ren c:\\temp\\Search.exe Search_after.exe"; ------------------------------------------------------ I created a exe for the above find.pl program. So my output would be "find.exe". If i execute the find.exe, a DOS window is opened and it is executing the Search.exe which is there in the C:\temp folder. After this, i am finding 2 processes in Task manager 1) Find.exe 2) Search.exe. Upto this i am fine. but the find.exe window is not disappearing by executing the whole code. Rather it is executing and stand there itself on first line. So the subsequent codes which i have written in that program is not executed. If i kill that Search.exe from task manager, then it is executing the other code and its process also disappears from taskmanager. What I want now? 1) I wanted to keep that Search.exe should be running. 2) I wanted to execute all the code in the Find.exe then it should auto close as per the normal exe file execution behavior. Can any one please answer my questions?
|