Hi,
Thanks, that should work.
The problem is that we are interfacing to a government dept using PKI software supplied by them (Not very well written) which creates temp files in it's own %PROGRAMFILES% directory, and if the rights change, the software does not work, no errors.
I just need to check that the correct rights are set in their software directory prior to transmission, and if not set the required rights.
>>What I am looking for is the best way (via code) of sensing the change and resetting to the required rights, any ideas.
>
>First of all it is not recommended to modify files in %PROGRAMFILES% subfolders. (This means where your program is installed)
>Because by default users have no permission to write there. (And this is good - they cannot damage program files).
>You must use Application Data folder in the user's profile to save application data like databases, settings and so on.
>
>Anyway, the best (and easiest) way to check permissions is to try them.
>If you cannot create file in some folder then you have no create/write permissions.
>
>The NTFS permissions could be set via API. I found some example code in VB.
>
http://support.microsoft.com/default.aspx?scid=kb;EN-US;295004>I don't know is there some VFP example available.
Regards N Mc Donald