Hide and restrict partitions using the Vista Group Policy

Source: Internet
Author: User

Group PolicyWindows XP has powerful functions, but in Windows Vista, group policies also have many functions. The following describes how to hide and limit partitions by using the Vista group policy.

Using the Group Policy object editor that comes with Windows Vista, you can easily hide and restrict specified partitions, and the operations are not complex. However, this feature is not provided in the home edition.

Open the run dialog box and enter "gpedit. choose "user configuration"> "user configuration"> "manage template"> "Windows Components>" Windows Resource Manager "in the Group Policy object editor. After the Group Policy is enabled, we can hide and display partitions as we wish.

Hide specified partition

Double-click "Hide specified partitions in my computer" in the right pane, and select "enabled" in the Properties window (figure 1 ), we can see that seven default options are provided to restrict access to the partition. You can make a choice based on the actual situation. For example, select "restrict partition C only" here ", after confirmation, you can hide the partition C icon in the "computer" and "Windows Resource Manager" Windows, and the partition icon does not appear in the "open" or "Save as" dialog box.

Figure 1

Restrict specified partitions

The partition hidden by using the above method is just a simple restriction method. We can still press "c: \" in the address bar to forcibly enter the hidden partition, therefore, we need to continue our brains.

Double-click "prevent partition access from my computer" in the right pane, select "enabled", and select "restrict partition C only" from here ", after confirmation, access to the C partition can be restricted. At this time, not only do you not see restricted C partitions in the "computer" or "Windows Resource Manager" window, but even if you use the "Address Bar" for forced access, an error message will pop up (figure 2 ).

Figure 2

Add a partition limit combination

Although the above method is simple and easy to use, you can hide the most important C-disk partition, but what if you want to hide other partitions? For today's massive hard disks, if there are many partitions, for example, if you want to restrict partitions E and F, you may not be able to use the Group Policy object editor. However, you can modify the configuration file of the Group Policy to hide other partitions.

For Vista, the Group Policy file is stored in the path "% windir % \ PolicyDefinitions \". What we need to care about is "WindowsExplorer. adml and WindowsExplorer. "admx" Two configuration files. Copy these two files.

Modify the WindowsExplorer. adml File

Open the WindowsExplorer. adml file in notepad and find the part that contains the following code:

<StringTable>

<String id = "ABCDOnly"> only partitions A, B, C, and D are allowed. </string>

<String id = "ABConly"> only partitions A, B, and C are allowed. </string>

<String id = "ABOnly"> only partitions A and B </string>

<String id = "ALLDrives"> restrict all partitions </string>

In fact, the above Code is the corresponding option in the Group Policy. Here we can add new content according to our own needs. For example, to hide the E partition, add the following code, save the modification and exit:

<String id = "EOnly"> only limit partition E </string>

Modify the WindowsExplorer. admx File

Still use NotePad to open WindowsExplorer. admx file, find "<enum id =" NoDrivesDropdown "valueName =" NoDrives "required =" true ">" and "<enum id =" NoDrivesDropdown "valueName =" NoViewOnDrive "required =" true ""> ", the former is used to restrict access to partitions, and the latter is used to hide partitions. For example, if we use partition E as an example, add the following code at the two locations, here "16" indicates the decimal code of the E partition:

 
 
  1. </item> 
  2.  
  3. <item displayName="$(string.EOnly)"> 
  4.  
  5. <value> 
  6.  
  7. <decimal value="16" /> 
  8.  
  9. </value> 
  10.  

Replace two important files

Due to access control permissions, we first need to modify the access permissions of the two files, open the Properties dialog box, and switch to the "Security" tab, click the "advanced" button to change the owner and set the owner. After obtaining the permission, you can complete the file replacement operation.

Now, you can re-open the "hide these specified partition attributes in my computer" dialog box and select "enabled". Figure 3 ), it can be seen that the restriction combination just added has appeared here. Is it very interesting?

Figure 3

Using the Vista group policy, we can hide and limit partitions as needed. The knowledge about more groups of policies needs to be learned and consolidated by the readers.

Related Article

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.