Yathosho
10th March 2011 20:07 UTC
Access denied
i know this is kinda stupied to ask, as i can't provide an example script to reproduce the problem, but maybe someone can figure out the problem anyway.
my script creates a directory ("$PLUGINSDIR\dll") and puts a DLL in that. at some later point, it will delete the dll again. however, from there on the directory will be inaccessible, i can neither read from it nor write to it. opening the directory (dll) in explorer gives me an "access denied" message. when i replace the dll with any other file, the problem does not occur.
happens on both win7 and xp, the latter using no extra protections like antivirus software.
Anders
10th March 2011 20:51 UTC
Sounds like a open handle problem, you could try looking at the handle list in the lower panel of Process Explorer
Yathosho
10th March 2011 21:17 UTC
it doesn't show up. the dll is never used by any process, it's just being extracted from an archive and (optionally) deleted again (using RMDir). makes no change if i delete the dll before calling RMDir.
Anders
10th March 2011 21:35 UTC
Fire up Process Monitor...
demiller9
10th March 2011 22:27 UTC
If you delete the dll using RMDir, the directory will be deleted too. Is that why you can't access it afterward?
Yathosho
10th March 2011 22:33 UTC
seems it can't delete the empty directory for the dll-file (DELETE PENDING), so i guess windows treats dlls differently as it works with other filetypes
Afrow UK
10th March 2011 22:55 UTC
You have changed the working directory before you attempt to delete (SetOutPath)?
Stu
Yathosho
11th March 2011 15:26 UTC
Originally posted by demiller9
If you delete the dll using RMDir, the directory will be deleted too. Is that why you can't access it afterward?
it should be recreated, as the filestructure (dll\MyFile.dll) exists within the 7z file i'm extracting to $PLUGINSDIR. and as i said before, it works with other filetypes.