Re: How can I check the mapped drives of the user session?

Tech-Archive recommends: Fix windows errors by optimizing your registry



if it is what i think, this might help:

@echo off & setlocal enabledelayedexpansion

for %%f in (

"\\tsclient\C"
"\\tsclient\D"
"\\tsclient\E"
"\\tsclient\F"
"\\tsclient\G"
"\\tsclient\H"
"\\tsclient\I"
"\\tsclient\J"
"\\tsclient\K"
"\\tsclient\L"
"\\tsclient\M"
"\\tsclient\N"
"\\tsclient\O"
"\\tsclient\P"
"\\tsclient\Q"
"\\tsclient\R"
"\\tsclient\S"
"\\tsclient\T"
"\\tsclient\U"
"\\tsclient\V"
"\\tsclient\W"
"\\tsclient\X"
"\\tsclient\Y"
"\\tsclient\Z"

) do (

:: remove dbl'quotes
set p=%%f
set p=!p:"=!

if exist "!p!\." (
:: do something with the share, delete recursively, search for password files and pin's... ;)
echo user %USERNAME% has mapped drive !p! local...
)
)

you must test for each and any drive letter because the \\tsclient is not ``enumeratable''...

-jolt

"Kanth" <Kanth@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag news:CC3F02AD-366B-4D6F-9D83-F72F9C76EAB8@xxxxxxxxxxxxxxxx
Hi,

Is there any way to check the user mapped drives for the user's session?

- Kanth
www.datahint.com

.