Xianhui's profileCold MountainPhotosBlogLists Tools Help

Blog


    November 08

    win7系统下删除vista系统文件方法之一

    今天下午写完作业无聊时想起来把双系统删掉vista变成单系统,结果发现win7下根本删除不了vista的系统文件。然后折腾了四个小时,就为了两个命令,我发现我很不适合看命令或者函数的参数说明,总是很晕,喜欢直接看example.
    研究一会儿发现是owner和access的问题,即,首先你的账户要own这个文件,并且access是可以读写或者full control。
    系统文件的owner是安装时设好的,win7的用户没有vista系统文件的owner权限,通过上面两个步骤就可以获得文件的控制,并删除它(被系统正在使用lock的除外)。
    新的问题是,以上方法只能用在一个文件上,系统文件夹里文件太多,不能一个一个这么删,好在古老的cmd很nb,用ctrl+shift+enter 运行cmd,管理员模式,加takeown和cacls icacls两个命令调整own和access就可以了。
     
    takeown /f c:\Windows\ /r  这个命令获得这个文件夹和子文件夹下所有文件的owner,/r代表继承。
    icacls * /grant kong:(OI)(CI)F /T 这个获得full control access,包括子文件夹下所有东西。
    参数:
    /grant   
    (OI)(CI)     This folder, subfolders, and files.
    F full control, T Traverse all subfolders to match files/directories.
    关于这个命令这里有详细的说明:
    现在就可以随便删除系统文件了,很自由,自由的感觉很好。
     
    当然了,最简便的方法还是装系统格盘,但是这么试试古老的cmd也不错,挺怀旧。

    Comments (6)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    oo huangwrote:
    嘿嘿,果然不行~因为毕业了...
    Nov. 11
    Xianhui kongwrote:
    https://msdn04.e-academy.com/elms/Security/Login.aspx?campus=utexas_eng
    在这里用ut eid登录,必须是engineering的学生吧
    https://www.engr.utexas.edu/dnapps/labaccess/requestlabaccess.aspx
    在这里enable你的account for engineering
    Nov. 10
    oo huangwrote:
    给个连接,看看我还能不能蹭到~
    Nov. 10
    Xianhui kongwrote:
    win7对于2g内存的电脑很不错,使用界面很舒服,软件兼容性不错,现在bs打游戏的都装win7。
    学生版不知道怎么买,我们工程学院的都有一个人一个的免费professional版
    停止响应的问题,我遇到过一次,不清楚。
    Nov. 9
    Binwrote:
    我感觉win7和vista差不多爱停止响应。。。
    Nov. 8
    oo huangwrote:
    话说win7怎么样啊?
    我还想找你们帮我买个学生版呢
    Nov. 8

    Trackbacks

    The trackback URL for this entry is:
    http://mypastorale.spaces.live.com/blog/cns!221F8908AEFD38C!1430.trak
    Weblogs that reference this entry
    • None