Im working on some code to replace applications on remote clients. I have the new apps copied over and am searching the process list to see if they are running. If they are running then I want to tell them to close so that I can replace them.
To this point Ive been working with
Win32::OLE->GetObject('winmgmts:\\\\') and calling ->Terminate() using the process id
*and*
Win32::Process::KillProcess( $objProcess->ProcessId, 1 )
The issue Im facing is that neither of these seem to be a 'clean' exit. The apps in question need to believe that they are being shut down in an 'orderly' fashion so they can write data out. Suggestions?