Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows seems to lose track of .NET application

We have a .NET application that we distribute to our users via an MSI installer package. We have C++ applications that run each morning to see if the user's copy of the application is out of date, and if so, we pull down the new MSI and install it. If the application is running, we need to take it down so we can perform the update.

Our problem is that every once in a while it seems like windows "loses" our application. It will not report that the process is running - though it is. It will allow us to overwrite, or even delete, the in-use executable file without taking down the application.

Maybe this is something that is common -- but we can't figure out what is going on! Does anyone have any insight into this situation?

It seems like a temporary copy of our application is getting created, and the program is getting ran from that. But if that is the case, why doesn't it happen all the time?

EDIT: In our program, We are using the "EnumProcesses" function from the Platform SDK, PSAPI.dll, to enumerate all of the running processes.

like image 571
Matt Avatar asked Nov 05 '22 16:11

Matt


1 Answers

Could it be that either the script or the application runs as a 64-bit program, and the other as a 32-bit program? If so, then on 64-bit machines the update check could be looking in the wrong location for an existing application and thus reporting it as missing?

like image 126
Sam Harwell Avatar answered Nov 14 '22 21:11

Sam Harwell