The NetworkService user account does not have a desktop. Hence the error.
news:d2d3e2e0-5d0e-4a94-94c7-f5b653c61eef@y10g2000prc.googlegroups.com...
On May 25, 7:29 pm, Joseph M. Newcomer <newco...@flounder.com> wrote:
Yes, that sounds right. First rule: DO NOT RUN A GUI-BASED APP AS A SERVICE! It is a
common design error, but it is a really bad, bad idea. There is now a massive security
hole in your system. In Vista, it is my understanding that this now forbidden.
When running as a service, unless you have given it a specific login account, it has no
desktop, and shouldn't, so you are seeing absolutely correct behavior.
A service should *never* interact with the user. If you want a GUI, the correct design is
to create a service which has no user interface whatsoever, create a GUI app that
communicates to the service (most commonly over a Named Pipe), and do the GUI work in the
GUI app which is an ordinary app.
I have never understood the compulsion to take a GUI app and make it a service.
joe
On Mon, 25 May 2009 00:49:23 -0700 (PDT), Matrixinline <anup.kata...@gmail.com> wrote:
Hi All,
I am running my application as Service. Now When I want to save a
file, I tried using CFileDialog. but when ever I select "desktop" it
prompts a message as "C:\document and setting\networkService\desktop"
refers to location that iss unavailable. It could be hardware on this
computer, or on a network... "
I checked that "C:\Documents and Settings\NetworkService" is available
but there is not desktop directory inside it.
Can you please let me know solution for this issue.
Thanks
Anup
Joseph M. Newcomer [MVP]
email: newco...@flounder.com
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm