取消
显示结果 
搜索替代 
您的意思是: 

How close an executable

Thanks, the start mspaint command (for me) works but not the kill task (always error message) ? And when I highlight the execution, the execution doesn't go to the sequence structure, it blocks at the system exec except when I manually close the paint application.  
0 项奖励
11 条消息(共 23 条)
2,581 次查看
I'm not sure why it doesn't work...
Which error messages/codes do you get?
After the .bat file has functioned, I would suggest that you lay the TASKKILL likewise in an .bat file and call it with the same principle of the before posted example.
If you have closed the process by hand,  you will get only error code 128 "Process "xxx" was not found.

Furthermore, you can create the .bat file dynamically with the "write to text file" function.

Regards,
ThSa
0 项奖励
12 条消息(共 23 条)
2,565 次查看

Hi,

 

The error message I get is error 2: possible reason memory is full. I did the same thing with taskkill than with start ms paint but it dosen't work (see the attached code in oreder to see if I did right).

It is maybe worthnoting to say that the command taskkill doesn't work in the start-run.  

0 项奖励
13 条消息(共 23 条)
2,554 次查看

Hi,

 

The error message I get is error 2: possible reason memory is full. I did the same thing with taskkill than with start ms paint but it dosen't work (see the attached code in oreder to see if I did right).

It is maybe worthnoting to say that the command taskkill doesn't work in the start-run. 

0 项奖励
14 条消息(共 23 条)
2,546 次查看
I think, further steps are Windows support and not LabVIEW support...
Navigate to C:\Windows\system32 and look for taskkill.exe

Regards,
ThSa

0 项奖励
15 条消息(共 23 条)
2,546 次查看
Yes, taskkill exists in windows 32.
0 项奖励
16 条消息(共 23 条)
2,541 次查看
I tried this on my system and found that it worked with some applications and it did not work with others.  In the applications that did not work, if you close the application manually, the vi will then start the delay timer and finish its execution, you can see the command window pop up for the kill.
 
Here are some applications that this vi works with:
winword.exe
excel.exe
visio.exe
wordpad.exe
 
Here are some applications that do not work:
mspaint.exe
notepad.exe
calc.exe
 
My guess is this:  It seems like the vi waits for some acknowledgement from the application that the open was successful.  Those that did not work never sent acknowledgement, and the vi gets hung up on the first System Exec call.  When the app is closed manually, the Sys Exec gets something and the vi continues.
- tbob

Inventor of the WORM Global
0 项奖励
17 条消息(共 23 条)
2,526 次查看

Hi,

 

Yes I confirm what you said but it seems that in creating a constant on wait until completion in the system exec.vi the information passes. But I have always the problem of error 2 that occured in the second system exec Vi: memory is full. It is a strange problem because, of course, it is not true.

 

It is fundamental for me, the application automatically closes or minimizes and reappears automatically. If not I lost the control of the experiment.    

0 项奖励
18 条消息(共 23 条)
2,516 次查看
Hi, I succeed to send a taskkill application to the run start  mode of my  PC, but it doesn't work with labview, it opens the application, runs until 5 seconds and after, when it must close the application error message: memory is full occured, with blinking to the second system exec. vi.

I use windows XP professionnal.
0 项奖励
19 条消息(共 23 条)
2,508 次查看
Problem resolved. I reconfigure  taskkill with bat file and it works.
Thanks a lot for your help.
0 项奖励
20 条消息(共 23 条)
2,502 次查看