RE: List user's mapped drives on a remote PC



I tried your script from Windows 2003 Terminal Server against XPsp1
workstations. It didn't work. I've also tried running it from XPsp1 against
XPsp1 -once again it didn't work. It listed non-type 4 drives (floppies,
CDROMS, hard disks) on the remote PCs but not the mapped shares (type=4).

If it's working for you, I'd be interested in how our setups differ.
--
Scott McWilliams
EDS Canada


"ESP" wrote:

> True, but after correcting the typo, it works 100% of the time from my Win
> 2003 Server.
> ESP
>
>
>
> "Scott McWilliams" wrote:
>
> > Thanks ESP, but that does not work. When I tried your code, I first thought
> > it was working but it was listing the local computer mapped drives. When I
> > corrected the strcomputer/strdestination typo in the code, it yielded the
> > same results as I have already found. It would list the hardware-based
> > drives, but not the drives mapped by the current user of the remote XP
> > computer (DriveType = 4).
> >
> > I understand that XP behaves differently than W2K Pro in this regard. With
> > W2K Pro, all sessions on the computer see the same shares. With XP, it
> > changes to a more Terminal Server-ish model where the WMI session on the
> > remote computer cannot see the shares mapped in the interactive user logon
> > session.
> >
> > I'm looking for a scripted way of enumerating the mapped drive shares in the
> > interactive user session on the remote XP PC.
> >
> > Thanks anyway!
> > --
> > Scott McWilliams
> > EDS Canada
> >
> >
> > "ESP" wrote:
> >
> > > This is along the same lines, but should give ya what you want.
> > >
> > > strComputer = InputBox("Enter the machine name without '\\' ", "Machine Name")
> > > If strComputer = "" Then WScript.Quit
> > > Set objDrives = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
> > > strDestination).InstancesOf("Win32_LogicalDisk")
> > > For Each INST in objDrives
> > > WScript.Echo (INST.deviceid) & vbTAB & (INST.Description)
> > > Next
> > >
> > >
> > > ESP
> > >
> > >
> > >
> > >
> > > "Scott McWilliams" wrote:
> > >
> > > > I'm trying to come up with a scripted methodology of listing the mapped
> > > > drives of the current user on remote PCs. I've found an article on Technet's
> > > > Hey Scripting Guys archive
> > > > (http://www.microsoft.com/technet/scriptcenter/resources/qanda/oct05/hey1027.mspx
> > > > ) that describes what I want to do perfectly. I have built my script around
> > > > this code, but have found that, although the article states "As usual, you
> > > > can modify this script to run against a remote computer simply by assigning
> > > > the name of that machine to the variable strComputer", you cannot enumerate
> > > > the shares on a remote PC (XP in this case) - the response always comes back
> > > > blank. The same methodology works great when run locally on the PC.
> > > >
> > > > How would I go about listing the mapped drives used by the current user of a
> > > > remote PC?
> > > >
> > > > TIA
> > > > --
> > > > Scott McWilliams
> > > > EDS Canada
.



Relevant Pages

  • Re: Great SWT Program
    ... the session running if the screen client loses its connection or shuts ... Given that I do a lot of remote work over the internet at large, ... but consumes a large amount of bandwidth when updating ...
    (comp.lang.java.programmer)
  • RE: Spying, admin to user login?, Is it possible?
    ... shadow session could not be created directly on Windows XP computer. ... you could active only one user session at one time ... you need to remote desktop to a Windows 2003 ... Microsoft also publishes a KB to describe this work around in detail. ...
    (microsoft.public.windows.server.sbs)
  • RE: Printer share name changes HELP!
    ... occurs after the session has disconnected and upon reconnect it then connects ... you have two remote PCs connecting to Windows 2000 Server ... In a Microsoft Windows 2000-based Terminal Services session, ...
    (microsoft.public.windows.terminal_services)
  • Re: RDP using RPC over HTTP
    ... Remote Networking Technology Support Site - ... >server as Exchange. ... >The question is can you get the TSWeb to use RPC over HTTP. ... >start an session of RD from there, kind of RD inside RD as you suggested? ...
    (microsoft.public.windowsxp.work_remotely)
  • Re: remote control "error 5 - access is denied"
    ... Active Session of Another User in Windows 2000 Terminal Services ... MCSE, CCEA, Microsoft MVP - Terminal Server ... SQL troubleshooting: http://sql.veranoest.net ... Session remote control failed. ...
    (microsoft.public.windows.terminal_services)

Loading