Vista Group Policy Editor hides and restricts partitions

  

With Windows Vista's own Group Policy Object Editor, you can easily hide and restrict specified partitions, and the operation is not complicated. However, this feature is not available in the home version.

Open the Run dialog box and manually enter “gpedit.msc”Go to the Group Policy Object Editor, select “User Configuration", and then navigate to “User Configuration →Administrative Template →Windows Components &rarr ; Windows Explorer, after launching the group policy, we can follow the idea and hide and display the partition as we like.

Hide the specified partition

Double-click “Hide & lsquo; these specified partitions in My Computer & rsquo; in the right pane, open the properties window and select “Enabled&rdquo (Figure 1), you can see that there are 7 default options available to restrict access to the partition, you can choose the actual situation, for example, select here “ only limit the partition C & rdquo;, after confirmation can be in the "computer & rdquo; and "Windows Explorer  window hides the icon of partition C, and the icon of the partition does not appear in the "Open" or "Save As" dialog box.

Limiting the specified partition

The partition hidden by the above method is just a simple restriction method. We can still force it by typing "ld:;c:\\”" in the address bar. The hidden partitions, so you still need to continue to brainstorm.

Double-click "“ from the "My Computer" Access Partition" in the right pane, select “Enabled”, select from here “ only limit partition C”, after confirmation You can restrict access to the C partition. At this time, not only the restricted C partition is not seen in the "Computer" or "Windows Explorer" window, and an error message will be displayed even if the access is forcibly accessed through the "address bar".

Adding a partition limit combination

Although the above method is simple and easy to use, you can hide the most important C drive partition, but what if you want to hide other partitions? For the current massive hard disk If there are more partitions, for example, if you want to limit the E and F partitions, you may not be able to use the Group Policy Object Editor. However, we can make it support the hiding of other partitions by modifying the configuration file of Group Policy.

For Vista, the Group Policy file is stored under the path "%windir%\\PolicyDefinitions\\", and we need to be concerned with "WindowsExplorer.adml" and "WindowsExplorer.admx" Profile, please copy the two files.

Modify the WindowsExplorer.adml file

Open the WindowsExplorer.adml file with Notepad and find the section containing the following code:

<stringTable>

< ;string id="ABCDOnly">Only restrict partitions A, B, C, and D</string>

<string id="ABConly">Only restrict partitions A, B, and C< /string>

<string id="ABOnly">Only restrict partitions A and B</string>

<string id="ALLDrives">Restrict all partitions </string>

In fact, the above code is the corresponding option in Group Policy, we can add new content here according to our own needs, for example, need to hide the E partition, add the following code, modify the completion After saving exit:

<string id="EOnly">Restrict only partition E</string>

Modify WindowsExplorer.admx file

Still using Notepad Open the WindowsExplorer.admx file and find “<enum id="NoDriv esDropdown" valueName="NoDrives" required="true">”and&ld;enum id="NoDrivesDropdown" valueName="NoViewOnDrive" required="true">”, the former is used To restrict access to the partition, the latter is used to hide the partition, for example, here is the E partition as an example, please add the following code in two places, here "ld"; 16 & rdquo; represents the decimal code of the E partition:

</item>

<item displayName="$(string.EOnly)">

<value>

< Decimal value="16" />

</value>

Replacing two important files

Due to access control permissions, we first need two Modify the access rights of the files, open the properties dialog box, switch to the “Security” tab, click the “Advanced” button to change the owner and make the relevant settings. After obtaining the permissions, the file replacement operation can be completed. .



Copyright © Windows knowledge All Rights Reserved