Daniel, I did captured using ProcMon of deleting a file test5.txt via command prompt
but I still don’t understand why PreCreate()+PreSetInfo() are called twice, in fact it
should immediately stopped after PreCreate() the first time.
Here are the log info captured:
QueryOpen C:\Demo\test5.txt FAST IO DISALLOWED
CreateFile C:\Demo\test5.txt SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
QueryBasicInformationFile C:\Demo\test5.txt SUCCESS CreationTime: 6/8/2012 9:07:38 AM, LastAccessTime: 6/8/2012 9:07:38 AM, LastWriteTime: 3/20/2012 12:16:50 AM, ChangeTime: 6/5/2012 9:02:15 PM, FileAttributes: A
CloseFile C:\Demo\test5.txt SUCCESS
IRP_MJ_CLOSE C:\Demo\test5.txt SUCCESS
QueryOpen C:\Demo\test5.txt FAST IO DISALLOWED
CreateFile C:\Demo\test5.txt SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
QueryBasicInformationFile C:\Demo\test5.txt SUCCESS CreationTime: 6/8/2012 9:07:38 AM, LastAccessTime: 6/8/2012 9:07:38 AM, LastWriteTime: 3/20/2012 12:16:50 AM, ChangeTime: 6/5/2012 9:02:15 PM, FileAttributes: A
CloseFile C:\Demo\test5.txt SUCCESS
IRP_MJ_CLOSE C:\Demo\test5.txt SUCCESS
QueryDirectory C:\Demo\test5.txt SUCCESS Filter: test5.txt, 1: test5.txt
CreateFile C:\Demo\test5.txt ACCESS DENIED Desired Access: Delete, Disposition: Open, Options: Non-Directory File, Delete On Close, Attributes: n/a, ShareMode: Delete, AllocationSize: n/a
CreateFile C:\Demo\test5.txt SUCCESS Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
QueryAttributeTagFile C:\Demo\test5.txt SUCCESS Attributes: A, ReparseTag: 0x0
SetDispositionInformationFile C:\Demo\test5.txt ACCESS DENIED Delete: True
CloseFile C:\Demo\test5.txt SUCCESS
IRP_MJ_CLOSE C:\Demo\test5.txt SUCCESS
CreateFile C:\Demo\test5.txt ACCESS DENIED Desired Access: Delete, Disposition: Open, Options: Non-Directory File, Delete On Close, Attributes: n/a, ShareMode: Delete, AllocationSize: n/a
CreateFile C:\Demo\test5.txt SUCCESS Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
QueryAttributeTagFile C:\Demo\test5.txt SUCCESS Attributes: A, ReparseTag: 0x0
SetDispositionInformationFile C:\Demo\test5.txt ACCESS DENIED Delete: True
CloseFile C:\Demo\test5.txt SUCCESS
Any help will be appreciated :o)