BAT batch _dos/bat to restore default permissions on the C disk system

Source: Internet
Author: User
Tags goto ntfs permissions

Because of security, some of the permissions on C disk do not know where to set up, this provides a batch method to restore the system default permissions.

Copy Code code as follows:

@ECHO off
Setlocal
Echo ===============================
echo restores default NTFS permissions for C disk
Echo ==============================
Title Restore default NTFS permissions
: Menu
Echo.
echo [1] Restores the C disk default NTFS permission [effective after reboot]
echo [0] Exits
Echo.
@echo Enter the number above and press ENTER
@echo off
set/p menu=
If%menu% = = 0 goto exit
if%menu% = = 1 goto 1

: 1
echo restores the C disk NTFS permissions to the default, please ....
secedit/configure/db%systemroot%\security\database\cvtfs.sdb/cfg "%systemroot%\security\templates\setup Security.inf "/areas Filestore
Echo.
echo recovery complete, reboot effective
Echo.
echo [0] Exits
Echo.
@echo Enter the number above and press ENTER
set/p menu=
If%menu% = = 0 goto exit

: Exit
Exit

The above code is saved as Moren.bat

In fact, the most important thing is this sentence:
secedit/configure/db%systemroot%\security\database\cvtfs.sdb/cfg "%systemroot%\security\templates\setup Security.inf "/areas Filestore

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.