Re: How can I check the mapped drives of the user session?
- From: "jolteroli" <jolt1976@xxxxxxx>
- Date: Mon, 29 Dec 2008 18:46:31 +0100
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
.
- References:
- Prev by Date: Re: Changing password when running RemoteApp seamless sessions
- Next by Date: "Allow log on through Terminal Services"
- Previous by thread: Re: How can I check the mapped drives of the user session?
- Next by thread: Re: How can I check the mapped drives of the user session?
- Index(es):