In our MSI installer, we try to run that WMIC command early, before RemoveFiles happens:
Code: Select all
wmic Path win32_process Where "Caption Like '%%java%%.exe%%' AND CommandLine Like '%%OurProgramName%%'" Call Terminate(Our software may be started by different users on that machine, that's even likely.)
What we tried:
1. Run the WMIC from a Batch file
Failed because Batch cannot run as "Attached File".
2. Run the WMIC from a VBS file
The VBS can be run as attached file. OK, we might eventually succeed in running it before RemoveFiles happens.
Still Failed because the VBS would require a line like
Code: Select all
Set objShell = WScript.CreateObject ("WScript.shell")to run the WMIC command. Bad luck, VBS in an MSI installer has no "WScript" object.
I ran out of ideas. How to kill our processes to allow removal of the program files ?
Thank you,
Ruben
FOLLOW US
Get the latest news in Application Packaging