Limit Access to Local Computer with Internet Explorer 4.01

Last reviewed: January 13, 1998
Article ID: Q179221
The information in this article applies to:
  • Microsoft Internet Explorer version 4.01 for Windows 95
  • Microsoft Windows 95
  • Microsoft Windows 95 OEM Service Release 1
  • Microsoft Windows 95 OEM Service Release 2

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, you should first make a backup copy of the registry files (System.dat and User.dat). Both are hidden files in the Windows folder.

SUMMARY

This article describes how to limit access to hard disks on computers running Internet Explorer 4.01 with Windows 95, Windows 95 with Service Pack 1, Windows 95 OEM Service Release 1, or Windows 95 OEM Service Release 2.

MORE INFORMATION

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall Windows 95. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

NOTE: For information about how to edit the registry, view the Changing Keys And Values online Help topic in Registry Editor (Regedit.exe). Note that you should make a backup copy of the registry files (System.dat and User.dat) before you edit the registry.

To limit access to the local workstation, set the DWORD value NoRun to the value 0x1 in the following registry key:

   HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\
      Explorer

Setting this value disables viewing local files by typing a file address, or URL, (for example, "file://c:\") in the Address box. This registry setting disables using the Run command on the Start menu as well.

Setting this value also disables the ability to browse to the local file system using an embedded HTML link. For example, you cannot browse a file by clicking the HTML link provided by the <a href="file://c:\">My File System</a> tag when this registry setting is used.

If you want to disable access to a drive altogether, set the DWORD value NoDrives as indicated in the following table:

   Drive   DWORD value
   -------------------
   A       0x1
   B       0x2
   C       0x4
   D       0x8

Set this DWORD value in the following registry key:

   HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\
      Explorer

NOTE: All values are in hexadecimal.

This logic uses a bitwise left shift to decide which drive to use. For example, if you want to disable viewing drive C, set the DWORD value to binary 0100. The code takes the return value from the function, subtracts "A" from the value, and shifts the binary value left by that number of bits.

For example, drive C - drive A = 2. 0001 shifted to the left twice is 0100. Binary 0100 has the hexadecimal equivalent of 0x4. This is how you calculate the drive to disable.

As another example, if you want to disable drive N, use the following method to calculate the hexadecimal value to place in the registry:

  1. Determine the numerical placement value for the letter N. If A=1, B=2, C=3, and so on, then N=14.

  2. Subtract the numerical placement value for A from N (14-1=13).

  3. Left shift binary 0001 by 13. This becomes a binary number with 13 zeros following a 1 (0010 0000 0000 0000).

  4. Convert to hexadecimal: 0x2000.

To disable multiple drives, take each of the individual hexadecimal drive values and add them together for a composite hexadecimal value for the registry. For example, to disable drives C, D, and N, add 0x4 + 0x8 + 0x2000 to equal 0x200C.


Additional query words:
Keywords : kbenv kbui msiew95
Version : WINDOWS:4.01
Platform : WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 13, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.