================================================== =========================已报告的问题-无法通过标准方法获得NTFS文件夹的所有权
文件夹属性\安全性TAB \高级按钮\更改所有者
。
报告的问题-无法删除文件夹或文件,
。
========
场景
每次尝试使用称为“模板”的NTFS文件夹执行ANY功能时,我都会得到提示。
当前结果-信息:访问被拒绝。(“ G:\ OLD驱动器\ Program Files \ Microsoft Visual Studio x \ VC \ VCWizards \ CodeWiz.NET \ Component \ templates”)
============
测试1-失败
按照建议的解决方案附上的说明-
从Sysinternals下载PsExec.exe
C:\Windows\system32>TAKEOWN /F "G:\OLD Drive\Program Files" /R /D Y
==================================
结果(请参阅最后一条语句中的INFO)
SUCCESS: The file (or folder): "G:\OLD Drive\Program Files" now owned by user "P
CDGROUP\PCD$".
SUCCESS: The file (or folder): "G:\OLD Drive\Program Files\Microsoft Visual Stud
io 8" now owned by user "PCDGROUP\PCD$".
SUCCESS: The file (or folder): "G:\OLD Drive\Program Files\Microsoft Visual Stud
io 8\VC" now owned by user "PCDGROUP\PCD$".
SUCCESS: The file (or folder): "G:\OLD Drive\Program Files\Microsoft Visual Stud
io 8\VC\VCWizards" now owned by user "PCDGROUP\PCD$".
SUCCESS: The file (or folder): "G:\OLD Drive\Program Files\Microsoft Visual Stud
io 8\VC\VCWizards\CodeWiz" now owned by user "PCDGROUP\PCD$".
SUCCESS: The file (or folder): "G:\OLD Drive\Program Files\Microsoft Visual Stud
io 8\VC\VCWizards\CodeWiz\.NET" now owned by user "PCDGROUP\PCD$".
SUCCESS: The file (or folder): "G:\OLD Drive\Program Files\Microsoft Visual Stud
io 8\VC\VCWizards\CodeWiz\.NET\Component" now owned by user "PCDGROUP\PCD$".
INFO: Access is denied. ( "G:\OLD Drive\Program Files\Microsoft Visual Studio 8\
VC\VCWizards\CodeWiz\.NET\Component\templates" )
C:\Windows\system32>
==========
结论
问题未解决
===============
测试2-成功
CAVEAT-我只能在这里成功,因为该文件夹位于不是我的主引导(c :)的驱动器上,因此可以安全地脱机。在执行操作之前,我确保关闭了所有窗口。
Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Windows\system32> cd "G:\OLD Drive\Program Files\Microsoft Visual Studio 8\VC\VCWizards\CodeWiz\.NET\Component"
C:\Windows\system32>G:
G:\OLD Drive\Program Files\Microsoft Visual Studio 8\VC\VCWizards\CodeWiz\.NET\Component>chkdsk /f
The type of the file system is NTFS.
Cannot lock current drive.
Chkdsk cannot run because the volume is in use by another
process. Chkdsk may run if this volume is dismounted first.
ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID.
Would you like to force a dismount on this volume? (Y/N) Y
Volume dismounted. All opened handles to this volume are now invalid.
Volume label is DATABAK.
Stage 1: Examining basic file system structure ...
986368 file records processed.
File verification completed.
12 large file records processed.
0 bad file records processed.
Stage 2: Examining file name linkage ...
1261166 index entries processed.
Index verification completed.
0 unindexed files scanned.
0 unindexed files recovered to lost and found.
cd..
G:\OLD Drive\Program Files\Microsoft Visual Studio 8\VC\VCWizards\CodeWiz\.NET\
rd Component
================================================== ====
结果-Component文件夹已成功删除