Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to hide and to restrict access to the App-V (SoftGrid) client drive letter


View products that this article applies to.

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

↑ Back to the top


INTRODUCTION

This article describes how to hide and to restrict access to the App-V (SoftGrid) client drive letter.

↑ Back to the top


More Information

This article describes how to hide and to restrict access to the App-V (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 <REGISTRY> 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 App-V (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.
  1. During the monitoring phase of the installation wizard, start Registry Editor.
  2. Expand the following registry subkey:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  3. Right-click Explorer, point to New, and then click DWORD Value.
  4. For New Value #1, type NoDrives.
  5. Right-click NoDrives, and then click Modify.
  6. For Base, select Hexadecimal. For Value data, type 10000, and then click OK.
  7. Right-click Explorer, point to New, and then click DWORD Value.
  8. For New Value #1, type NoViewOnDrive.
  9. Right-click NoViewOnDrive, and then click Modify.
  10. For Base, select Hexadecimal. For Value data, type 10000, and then click OK.
  11. Exit Registry Editor.
  12. Click Stop Monitoring, and then complete the wizard.
  13. Save the sequence.

How to use a .reg file from the App-V (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.
  1. Start Registry Editor.
  2. Expand the following registry subkey:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  3. Right-click Explorer, point to New, and then click DWORD Value.
  4. For New Value #1, type NoDrives.
  5. Right-click NoDrives, and then click Modify.
  6. For Base, select Hexadecimal. For Value data, type 10000, and then click OK.
  7. Right-click Explorer, point to New, and then click DWORD Value.
  8. For New Value #1, type NoViewOnDrive.
  9. Right-click NoViewOnDrive, and then click Modify.
  10. For Base, select Hexadecimal. For Value data, type 10000, and then click OK.
  11. Right-click Explorer, click Export, and then save the .reg file.
  12. Exit Registry Editor.
  13. 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]
    "NoDrives"=dword:00010000
    "NoViewOnDrive"=dword:00010000
  14. Save the .reg file, and then exit the text editor.
  15. Open the .osd file by using a text editor.
  16. Enter the <SCRIPT> element and the child elements in the <DEPENDENCY> element as shown in the following example.
    <DEPENDENCY>
    <SCRIPT TIMING="PRE" EVENT="LAUNCH" PROTECT="TRUE" WAIT="TRUE">
    <HREF>%SystemRoot%\regedit.exe /s "PATH/FILENAME.reg"</HREF>
    </SCRIPT>
    </DEPENDENCY>
  17. Save the .osd file, and then exit the text editor.
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 App-V (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.
  1. Create a .vbs file that contains the following information.
    On Error Resume Next
    Dim WshShell
    Set WshShell = Wscript.CreateObject("wscript.shell")
    NoDrive = WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives")
    SetValue = WshShell.RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives","65536","REG_DWORD")
    NoViewOnDrive = WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewOnDrive")
    SetValue = WshShell.RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewOnDrive","65536","REG_DWORD")
    Set WshShell = nothing
  2. 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("wscript.shell")
    NoDrive = WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives")
    If NoDrive = "" ThenSetValue = WshShell.RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives","65536","REG_DWORD")
    End IfNoViewOnDrive = WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewOnDrive")
    If NoViewOnDrive = "" ThenSetValue = WshShell.RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewOnDrive","65536","REG_DWORD")
    End IfSet WshShell = nothing
  3. Open the .osd file by using a text editor.
  4. Enter the <SCRIPT> element and the child elements in the <DEPENDENCY> element as shown in the following example.
    <DEPENDENCY>
    <SCRIPT TIMING="PRE" EVENT="LAUNCH" PROTECT="TRUE" WAIT="TRUE">
    <HREF>%SystemRoot%\system32\wscript.exe "PATH/FILENAME.vbs"</HREF>
    </SCRIPT>
    </DEPENDENCY>
  5. Save and then exit the .osd file.
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 App-V (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.
  1. Open the .osd file by using a text editor.
  2. Enter the <REGISTRY> element and the child elements in the <VIRTUALENV> element as shown in the following example.
    <VIRTUALENV>
    <REGISTRY>
    <REGKEY HIVE="HKCU" KEY="Software\Microsoft\Windows\CurrentVersion\Policies\Explorer">
    <REGVALUE REGTYPE="REG_DWORD" NAME="NoDrives">10000</REGVALUE>
    <REGVALUE REGTYPE="REG_DWORD" NAME="NoViewOnDrive">10000</REGVALUE>
    </REGKEY>
    </REGISTRY>
    </VIRTUALENV>
  3. Save the .osd file, and then exit the text editor.

↑ Back to the top


Keywords: kbacqcompany, kbhowto, kbexpertiseinter, kb

↑ Back to the top

Article Info
Article ID : 931626
Revision : 2
Created on : 8/1/2019
Published on : 8/1/2019
Exists online : False
Views : 519