Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Jul : How To know if one directory is accessable to current login user.

www.cryer.info
Managed Newsgroup Archive

How To know if one directory is accessable to current login user.

Subject:How To know if one directory is accessable to current login user.
Posted by:"Daniel" (d..@earth.link)
Date:Wed, 25 Jul 2007 10:06:19

Hi,

    I have an application need to save myExe.ini while exit.  The problem is
that application is located in a Administrator- accessable-Only root. If
nomal user execute it and close it. He will get a 'Failed to write
....myExe.ini' error.

    What I want to do is,

        1.  detect if I am an Administrator now?
        2.  if not, How can I know if somedirectory(same as myExe.exe) is
writable to me?
        3.  if not writable, I want to Save it to  "CSIDL_LOCAL_APPDATA",
is this root accessabe to normal user?

thanks,
Regards,

Daniel

Replies:

www.cryer.info
Managed Newsgroup Archive