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



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: Some help With BOF Exploits Writing.
    ... Remote bof exploitation is little bit harder, ... do "movl %esp, %eax" for finding return address. ... by using the stack pointer esp. ...
    (Vuln-Dev)
  • Re: Devices on remote machines
    ... WScript.Echo "You must enter the computer name when starting this script." ... WScript.Echo "Network printer mappings:" ... although I have full rights ont the remote machine ... have both mapped drives & network printers connected to their machine. ...
    (microsoft.public.scripting.vbscript)
  • Re: Remote Desktop
    ... Do you need to use Remote ... "stonehead" wrote in message ... > When I go to restore db in SQL 2000 using 'Remote Desktop' I can only see ... can see the local and mapped drives when trying to restore db. ...
    (microsoft.public.sqlserver.server)
  • RE: List users mapped drives on a remote PC
    ... hard disks) on the remote PCs but not the mapped shares. ... >> it was working but it was listing the local computer mapped drives. ... >> changes to a more Terminal Server-ish model where the WMI session on the ...
    (microsoft.public.scripting.vbscript)
  • Mapped Drive Disconnects over VPN
    ... We have a remote office with XP & 2KPro clients which connect to a ... remote systems are rebooted, and if the VPN tunnel disconnects, the ... mapped drives are not reconnected. ...
    (microsoft.public.windows.server.networking)