Thanks for the information! Since the issue only happens on a particular
user's computer, we can say it should not be related to our codes, but
related to the specific environment, right?
If that is the case, my best guess is that the file's attributes may be
changed by other applications or services running on that computer, like
Google Desktop Search, Winzip, Windows Searching Index or a virus-anti
software. These applications has a commonness that may run in background to
iterate through all files on the local driver
, and lock, manipulate them. I
would like suggest your customer to check this.
By the way, I am not very sure if the System attribute is the real root of
the problem. In my opinion, when a file cannot be deleted, the most two
possibility to are,
1.Security issue. If the current user does not have the permission to
delete the System attribute file, the issue can occur.
2.Lock issue. The file is manipulated by another process and not released.
That is to say the file is locked.
However, I highly recommend you two tools that may be very helpful to
troubleshooting this issue.
1.The Process Explorer which I have mentioned in my first reply already. If
the reason is the file is locked by other process. We can easily find the
file handle's ownership in the Process Explorer as described in the
Microsoft KB articles.
2.The Process Monitor which is available in this link
. This tool is
also very powerful to trace all actions on all files in the machine. In
this case, we can find which application changes the file's attribute to
System|Hidden|ReadOnly. The following is an example. If I set a
file(D:\test.txt)'s attribute to ReadOnly|Hidden from explorer, I can find
the following log in ProcessMon,
9612 4:25:23.3918150 PM Explorer.EXE 3724 SetBasicInformationFile
D:\test.txt SUCCESS CreationTime: 1/1/1601 8:00:00 AM, LastAccessTime:
1/1/1601 8:00:00 AM, LastWriteTime: 1/1/1601 8:00:00 AM, ChangeTime:
1/1/1601 8:00:00 AM, FileAttributes: RHAN
Ji Zhou (v-jzho@xxxxxx, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
Get notification to my posts through email? Please refer to
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
This posting is provided "AS IS" with no warranties, and confers no rights.