Have you tried running the service under different accounts?  Since some of
the directories returned by GetSpecialFolderPath are based on the current
logged in user, you might modify the login for the service.

Robert

On Tue, Nov 10, 2009 at 5:20 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]



------------------------------------

-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [email protected]! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/delphi-en/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to