What windows account are you running the service under? By default it  
runs under a limited access system account which is why I think the  
error is occuring. You could try modifying the properties of the  
service in windows to force it to run under your account. Hope this  
helps.

Tim

Sent from my iPod

On Nov 10, 2009, at 6:27 AM, "Paul" <[email protected]> wrote:

> Hi all,
>
> I am in the process of rewriting one of my utility applications as a  
> windows service.
>
> Basically the app monitors a known subdirectory of MyDocs, in the  
> exe I make a call to GetSpecialFolderPath(CSIDL_PERSONAL) which  
> quite happily returns the path to the Local Users MyDocs directory.  
> However, when I try to do the same thing inside a windows service  
> app GetSpecialFolderPath(CSIDL_PERSONAL) returns an empty string!
>
> Also, having got the correct directory I then copy some common  
> lookup files from a network share into it. This also fails when run  
> under windows service (this is probably related to the same problem  
> as above).
>
> Any ideas gratefully received.
>
> Paul.
>
> 


[Non-text portions of this message have been removed]

Reply via email to