>>>>Attached please find the error I'm getting in WE when I log as a regular user and try to delete this file from the Windows Explorer.
>>>
>>>Try to copy this file in c:\ProgramData\xxxxxxx
>>
>>What exactly do you mean? Do you suggest me to try in WE for this user to copy the file into another directory under ProgramData ?
>
>Yes,
>Use ProgramData Folder to keep you files.
>This folder should be accessible for all users.
>
>**** Get \All Users\Application Data (XP) or ProgramData (Vista, 7) folder
>DECLARE INTEGER SHGetSpecialFolderPath IN Shell32.DLL INTEGER, STRING @lcPath, INTEGER, INTEGER
>lcPath = SPACE(255)
>IF SHGetSpecialFolderPath(0, @lcPath, 35, 0) == 1
> lcPath = ALLTRIM(lcPath)
> lcPath = ADDBS(TRIM(lcPath,1,CHR(0)))+[Naomi\]
> TRY
> *** Just in case the folder exists
> MD (lcPath)
> CATCH
> ENDTRY
> ** Test for copy file
> COPY YourFile.TXT TO (lcPath+"Test.TXT")
> ** Test for delete the file
> ERASE (lcPath+"Test.TXT")
>ENDIF
>
I see. It will be the same also if I try to copy my file to ProgramData folder using WE, right?
I plan to test your original FSO.DeleteFile right now, but in the meantime I delegated the problem to the people who create installers as I don't think we need to change our application code to fix the issue - there may be too many places where the code will need to be fixed.
If it's not broken, fix it until it is.
My Blog