开发者

How to detect running program and ask to close it from VS Msi project?

I have a simple Visual Studio MSI project.

I want to HALT the installation if I detect a running program of a certain type 开发者_如何学C(e.g. "aaa.exe") and wait until the user closes it before proceeding.

how do I do that?


Generally speaking, have you considered the Restart Manager?

Applications that use Windows Installer 4.0 for installation and servicing on Windows Vista automatically use the Restart Manager to reduce system restarts. The default behavior on Windows Vista is to shut down applications rather than shut down and restart the operating system whenever possible. In cases where a system restart is unavoidable, installers can use the Restart Manager API to schedule restarts in such a way that it minimizes the disruption of the user's work flow.

Restart Manager should automatically detect open files/handles-to-files that are are going to be updated by the .MSI and gracefully stop/restart them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜