Simon336697
asked on
Hiding Server Drives for Citrix Users
Hi guys,
For security, we'd like to hide server drives for citrix users. Now I know you can use Tweak UI to do this, but this only affects the logged on user. You cant use this tool to affect ALL users that log on to the Citrix box. In Group Policy, you can hide drives up to F drive I think, or something like that, but what if your local server drive is drive M?
So my question is, how can you hide drives for ALL users? I have tried putting a reg file that runs in usrlogon.cmd, but it doesnt seem to like it, even if you grant permissions to users to edit the registry.
Any ideas greatly appreciated.
Simon
For security, we'd like to hide server drives for citrix users. Now I know you can use Tweak UI to do this, but this only affects the logged on user. You cant use this tool to affect ALL users that log on to the Citrix box. In Group Policy, you can hide drives up to F drive I think, or something like that, but what if your local server drive is drive M?
So my question is, how can you hide drives for ALL users? I have tried putting a reg file that runs in usrlogon.cmd, but it doesnt seem to like it, even if you grant permissions to users to edit the registry.
Any ideas greatly appreciated.
Simon
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi oBdA
My god......this amount of work - you are a genius!
Thank you SO VERY MUCH for providing such incredible expertise here.
I really appreciate you responses mate. The skill here is of such a high level.
Thanks again.
Simon
My god......this amount of work - you are a genius!
Thank you SO VERY MUCH for providing such incredible expertise here.
I really appreciate you responses mate. The skill here is of such a high level.
Thanks again.
Simon
====8<----[HideDrives.cmd]
@echo off
setlocal
if "%~1"=="" goto Syntax
set i=1
:: *** Create a table with the values of the drive letters:
for %%a in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (
set /a Power[%%a] = i
set /a i *= 2
)
set HideDrives=0
:: *** Calculate the value for the drive letters to be hidden.
:: *** If a letter has been found, set the table entry to zero to avoid
:: *** calculation errors if a drive letter is specified twice.
for %%a in (%*) do (
set /a HideDrives += Power[%%a]
set /a Power[%%a] = 0
)
:: *** If no valid drive letter found, explain the syntax:
if "%HideDrives%"=="0" goto Syntax
echo HideDrives value: %HideDrives%
goto leave
:Syntax
echo.
echo HideDrives.cmd
echo.
echo Caclulates the value to be used in the "Hide drives" group policy
echo when hiding customized drives.
echo Syntax:
echo HideDrives ^<Drive letter list^>
echo ^<Drive letter list^>: A space separated list of drive letters to be hidden.
echo Drive letters are case indifferent and can be listed in any order.
echo Example: HideDrives a M c
echo HideDrives value: 4101
:leave
====8<----[HideDrives.cmd]