Microsoft KB Archive/931626

= How to hide and to restrict access to the SoftGrid Client drive letter =

Article ID: 931626

Article Last Modified on 4/17/2007

-

APPLIES TO


 * Microsoft SoftGrid for Terminal Services
 * Microsoft SoftGrid for Windows Desktops

-



Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



INTRODUCTION
This article describes how to hide and to restrict access to the SoftGrid Client drive letter.



MORE INFORMATION
This article describes how to hide and to restrict access to the SoftGrid Client drive letter by using Group Policy objects (GPO). The policies can be applied when the sequence is created, is updated, or is started. When you start the policies, you can apply the policies to the virtual registry by modifying the .osd file to import a .reg file or a .vbs file. Alternatively, you can use the  element.

Important Policies that you set in the virtual registry take precedence over policies that are set in the local registry. For example, if the local registry is configured to hide the D drive, and if the virtual registry is configured to hide the Q drive, only the Q drive will be hidden from the SoftGrid-enabled application. We recommend that you apply these policies by using domain policies. This article describes how to apply these policies when you do not use domain policies.

The examples that are outlined in this article hide and restrict access to the Q drive by setting the registry values to 10000 hexadecimal or to 65536 decimal. For more information about the hexadecimal or decimal number that is required to hide other drive letters, click the following article number to view the article in the Microsoft Knowledge Base:

231289 Using Group Policy Objects to hide specified drives

How to use Registry Editor from the Sequencer
To use Registry Editor from the Sequencer to apply the policies to the virtual registry, follow these steps.

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.  During the monitoring phase of the installation wizard, start Registry Editor. Expand the following registry subkey:

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

 Right-click Explorer, point to New, and then click DWORD Value. For New Value #1, type NoDrives . Right-click NoDrives, and then click Modify. For Base, select Hexadecimal. For Value data, type 10000, and then click OK.</li> Right-click Explorer, point to New, and then click DWORD Value.</li> For New Value #1, type NoViewOnDrive .</li> Right-click NoViewOnDrive, and then click Modify.</li> For Base, select Hexadecimal. For Value data, type 10000, and then click OK.</li> Exit Registry Editor.</li> Click Stop Monitoring, and then complete the wizard.</li> Save the sequence.</li></ol>

How to use a .reg file from the SoftGrid Client
This procedure describes how to modify the .osd file to apply the policies to the virtual registry. Perform this procedure when you start the application by using the <SCRIPT> element to import a .reg file. To create the .reg file, you must modify and then import the registry. Perform these modifications from the sequencing station without running the Sequencer. <ol> Start Registry Editor.</li> Expand the following registry subkey:

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

</li> Right-click Explorer, point to New, and then click DWORD Value.</li> For New Value #1, type NoDrives .</li> Right-click NoDrives, and then click Modify.</li> For Base, select Hexadecimal. For Value data, type 10000, and then click OK.</li> Right-click Explorer, point to New, and then click DWORD Value.</li> For New Value #1, type NoViewOnDrive .</li> Right-click NoViewOnDrive, and then click Modify.</li> <li>For Base, select Hexadecimal. For Value data, type 10000, and then click OK.</li> <li>Right-click Explorer, click Export, and then save the .reg file.</li> <li>Exit Registry Editor.</li> <li> Open the .reg file by using a text editor to verify that the contents appear as shown in the following example. Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] &quot;NoDrives&quot;=dword:00010000 &quot;NoViewOnDrive&quot;=dword:00010000 </li> <li>Save the .reg file, and then exit the text editor.</li> <li>Open the .osd file by using a text editor.</li> <li> Enter the <SCRIPT> element and the child elements in the <DEPENDENCY> element as shown in the following example. <DEPENDENCY> <SCRIPT TIMING=&quot;PRE&quot; EVENT=&quot;LAUNCH&quot; PROTECT=&quot;TRUE&quot; WAIT=&quot;TRUE&quot;> <HREF>%SystemRoot%\regedit.exe /s &quot;PATH/FILENAME.reg&quot;</HREF> </SCRIPT> </DEPENDENCY> </li> <li>Save the .osd file, and then exit the text editor.</li></ol>

The .reg file can reside in the sequence or in a remote network location. Make sure that the user who starts the application has access to the .reg file.

How to use a .vbs file from the SoftGrid Client
This procedure describes how to modify the .osd file to apply the policies to the virtual registry. Perform this procedure when you start the application by using the <SCRIPT> element to import a .vbs file. <ol> <li> Create a .vbs file that contains the following information. On Error Resume Next Dim WshShell Set WshShell = Wscript.CreateObject(&quot;wscript.shell&quot;) NoDrive = WshShell.RegRead(&quot;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives&quot;) SetValue = WshShell.RegWrite (&quot;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives&quot;,&quot;65536&quot;,&quot;REG_DWORD&quot;) NoViewOnDrive = WshShell.RegRead(&quot;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewOnDrive&quot;) SetValue = WshShell.RegWrite (&quot;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewOnDrive&quot;,&quot;65536&quot;,&quot;REG_DWORD&quot;) Set WshShell = nothing </li> <li> If you want to configure the .vbs file to determine whether the values already exist and to set the values only if they do not exist, create a .vbs file that has the following information. On Error Resume Next Dim WshShell Set WshShell = Wscript.CreateObject(&quot;wscript.shell&quot;) NoDrive = WshShell.RegRead(&quot;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives&quot;) If NoDrive = &quot;&quot; Then SetValue = WshShell.RegWrite (&quot;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives&quot;,&quot;65536&quot;,&quot;REG_DWORD&quot;) End If NoViewOnDrive = WshShell.RegRead(&quot;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewOnDrive&quot;) If NoViewOnDrive = &quot;&quot; Then SetValue = WshShell.RegWrite (&quot;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewOnDrive&quot;,&quot;65536&quot;,&quot;REG_DWORD&quot;) End If Set WshShell = nothing </li> <li>Open the .osd file by using a text editor.</li> <li> Enter the <SCRIPT> element and the child elements in the <DEPENDENCY> element as shown in the following example. <DEPENDENCY> <SCRIPT TIMING=&quot;PRE&quot; EVENT=&quot;LAUNCH&quot; PROTECT=&quot;TRUE&quot; WAIT=&quot;TRUE&quot;> <HREF>%SystemRoot%\system32\wscript.exe &quot;PATH/FILENAME.vbs&quot;</HREF> </SCRIPT> </DEPENDENCY> </li> <li>Save and then exit the .osd file.</li></ol>

The .vbs file can reside in the sequence or in a remote network location. Make sure that the user who starts the application has access to the .vbs file.

How to use the <REGISTRY> element from the SoftGrid Client
This procedure describes how to modify the .osd file to apply the policies to the virtual registry. Perform this procedure when you start the application by using the <REGISTRY> element. <ol> <li>Open the .osd file by using a text editor.</li> <li> Enter the <REGISTRY> element and the child elements in the <VIRTUALENV> element as shown in the following example. <VIRTUALENV> <REGISTRY> <REGKEY HIVE=&quot;HKCU&quot; KEY=&quot;Software\Microsoft\Windows\CurrentVersion\Policies\Explorer&quot;> <REGVALUE REGTYPE=&quot;REG_DWORD&quot; NAME=&quot;NoDrives&quot;>10000</REGVALUE> <REGVALUE REGTYPE=&quot;REG_DWORD&quot; NAME=&quot;NoViewOnDrive&quot;>10000</REGVALUE> </REGKEY> </REGISTRY> </VIRTUALENV> </li> <li>Save the .osd file, and then exit the text editor.</li></ol>

Keywords: kbhowto kbexpertiseinter KB931626

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.