13

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:

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:

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.

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?

1
  • 3
    Short answer: I believe that ALL of your guesses are correct. If you watch in Fiddler, you see that DFSVC does the version check/manifest download, and it's a very common pattern to keep these sorts of services around for a period of time as a perf optimization.
    – EricLaw
    Jan 17, 2013 at 20:54

1 Answer 1

7

DFSVC.EXE checks 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.