"hb21l5" <hb21l5@xxxxxx> wrote in message
news

59D792E-E61E-440B-B138-269DA4F771FA@xxxxxx
>I have this script which works fine,
> only problem is, it maps the drive whether they have permission or not.
> and
> so creating lots of mapped drives (accessable / unaccessable) on their
> explorers.
>
> Is there a way to check access before mapping the drive?
>
> e.g.
> if permission granted, then
> map drive
> end if Use the 'FolderExists' method of 'Scripting.FileSystemObject'. If the
user has permissions to the share, it will return 'True'. Otherwise, it will
return 'False'.
If oFSO.FolderExists("\\server\share") then
'Map Drive code
End If