无法在Windows 10中完全删除Cygwin [英] Can't Delete Cygwin Completely in Windows 10

查看:123
本文介绍了无法在Windows 10中完全删除Cygwin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在Windows 10安装程序中删除Cygwin.我缩小了范围,引起麻烦的文件是 C:\ cygwin \ usr \ share \ avogadro \ crystals \ zeolites \ CON.cif

I can't delete Cygwin in my Windows 10 setup. I narrowed it down and the file that's causing trouble is C:\cygwin\usr\share\avogadro\crystals\zeolites\CON.cif

推荐答案

在我看来,为什么无法删除cywin目录(文件夹)的原因是访问权限".要删除该文件夹,用户需要对该文件夹拥有所有权".在Windows GUI中无法轻松完成此操作.但是,使用三个命令行在命令提示符窗口中实现起来相当容易.

In my case why the cywin directory (folder) cannot be deleted was due to "access privilege". To delete the folder, the user needs to "take ownership" of this folder. It cannot be done easily in Windows GUI. It is, however, fairly easy to achieve in a command prompt window using three command lines.

我按照此链接.请务必非常确定自己在做什么.请注意,命令提示符下的DOS窗口必须以管理员"身份打开.该链接的内容:

I followed the steps posted in this link. Remeber to be very sure what you are doing. Take note that the command prompt DOS window must be opened as "administrator". What this link says:

以管理员"身份打开DOS窗口"cmd.exe".向命令提示符发出以下几行:

Open DOS Window "cmd.exe" as "administrator". Issue to the command prompt the following lines:

takeown /f "c:\cygwin" /r /d Y

最后一个参数使takeown对所有问题都假设是",并取决于语言环境.在作者的语言环境中,他/她必须回答"J"以使其起作用.

The last parameter makes takeown assume "yes" to all questions and depends on locale. In the author's locale he/she had to answer "J" to make it work.

icacls "c:\cygwin" /T /Q /C /reset

最后,在获得相关权限后删除文件:

Finally, to delete the files after we got the relevant permissions:

rd "c:\cygwin" /s /q

此方法应在Windows 7及更高版本中按预期工作.我在Windows7-x64和Windows10-x64中尝试过.

This method should work as intended in Windows 7 and above. I tried it in Windows7-x64 and Windows10-x64.

这篇关于无法在Windows 10中完全删除Cygwin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆