.net ClickOnce 运行时 DFSVC.EXE
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13312273/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ClickOnce runtime DFSVC.EXE
提问by codechurn
Can someone either detail or point me to some information on what role exactly the DFSVC.EXE plays in the execution cycle of a ClickOnce application? If I launch a ClickOnce application via:
有人可以详细说明或指出有关 DFSVC.EXE 在 ClickOnce 应用程序的执行周期中究竟扮演什么角色的一些信息吗?如果我通过以下方式启动 ClickOnce 应用程序:
rundll32.exe dfshim.dll,ShOpenVerbApplication http://www.domain.com/application/?param1=foo
I see that a DFSVC.EXE process is started. I then see that the actual EXE process of my ClickOnce application is invoked (by DFSVC.EXE, which is listed as the parent process in ProcessExplorer). At this point in time, I can kill the DFSVC.EXE via:
我看到 DFSVC.EXE 进程已启动。然后我看到我的 ClickOnce 应用程序的实际 EXE 进程被调用(通过 DFSVC.EXE,它在 ProcessExplorer 中被列为父进程)。此时,我可以通过以下方式杀死 DFSVC.EXE:
rundll32.exe dfshim.dll,KillService
and my ClickOnce application continues to run. I also noticed that if I do not kill the DFSVC.EXE, it will go away on its own after about 15 minutes.
并且我的 ClickOnce 应用程序继续运行。我还注意到,如果我不杀死 DFSVC.EXE,它会在大约 15 分钟后自行消失。
I suspect that DFSVC.EXE is responsible for downloading, installing and launching the application -- is this correct? Is there any way to tell DFSVC.EXE to shutdown automatically after these tasks are complete for an invoked ClickOnce application? Is the reason it is persisting (even after the ClickOnce application is shut down) an optimization for the next invocation of a ClickOnce application?
我怀疑 DFSVC.EXE 负责下载、安装和启动应用程序——这是正确的吗?有没有办法告诉 DFSVC.EXE 在调用 ClickOnce 应用程序的这些任务完成后自动关闭?它持续存在的原因(即使在 ClickOnce 应用程序关闭之后)是否是对 ClickOnce 应用程序的下一次调用的优化?
回答by Bohdan
DFSVC.EXEchecks if the application is already installed and up to date (if configured so), if required downloads the application to ClickOnce Folder in Users AppData and then launches it from it's current locations (which changes with every update). It also has to delete the previous version of the application which it might possibly do in the background afterwards.
DFSVC.EXE检查应用程序是否已安装并且是最新的(如果已配置),如果需要,将应用程序下载到用户 AppData 中的 ClickOnce 文件夹,然后从其当前位置启动它(每次更新都会更改)。它还必须删除之前可能在后台执行的应用程序版本。

