Want to script Windows WMI (wmiprvse.exe) to release handle on file

十年热恋 提交于 2019-12-03 21:43:06

I'm also looking for a solution to this problem. Would also like to understand why wmiprsve has handles on some of my service executables but not on others.

The workaround I'm using is to kill the wmiprvse process. You can use the SysInternals command line tools (pslist, pskill) to automate getting the process id and performing the kill.

You can simply restart the WMI service (winmgmt) to force it to release your files. If your service isn't registered when WMI starts it won't put a lock on the files.

Stop service, uninstall service, restart WMI, replace files, start service.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!