PDA

View Full Version : Close Exe during update


VJ123
09-05-2008, 02:06 AM
Hi,

From the appliation which iinstalled, i launch an exe which has the link to 'Check For Updates'. When i click that, the IIS Server is properly connected nad the patch is getting installed.

But after patch installation, the system is going for a FORCE REBOOT. I believe this may be due to the exe is opened during the patch installation (which also gets updated).

If that is the problem, the i thought i could detect the file in use and based on the boolean value returned, i can close that exe. Is there any function which closes the exe (by terminating the process)?

Thanks,
VJ

jassing
09-05-2008, 05:05 AM
Hi,

From the appliation which iinstalled, i launch an exe which has the link to 'Check For Updates'. When i click that, the IIS Server is properly connected nad the patch is getting installed.

But after patch installation, the system is going for a FORCE REBOOT. I believe this may be due to the exe is opened during the patch installation (which also gets updated).

If that is the problem, the i thought i could detect the file in use and based on the boolean value returned, i can close that exe. Is there any function which closes the exe (by terminating the process)?

Thanks,
VJ


You can use an API or search the forums -- there are a couple of versions of "FindAndCloseByName.lua"

I prefer to just detect that the exe is running and refuse to continue until the exe is closed...

VJ123
09-05-2008, 07:27 AM
Thanks for the suggestion.

I found this of interest- System.TerminateProcess(<processname>) and got it working.

Thanks a lot.

VJ123
09-05-2008, 07:28 AM
Thanks for the suggestion.

I found this of interest- System.TerminateProcess(<processname>) and got it working.

Thanks a lot for ur time.