2

When I type net use as Admin on my Windows 7 Machine, I see no shared drives mounted. However, there are drives connected by users. When I start the windows cmd shell with one of these users, I see these drives listed with net use.

How do you list the drives mounted by all users on Windows 7?

oz123
  • 1,198
  • 5
  • 16
  • 32

2 Answers2

4

The net use command refers to the currently logged in user(*). Nothing more, nothing less.

It is possible to authenticate as another user as part of a net use command of course, but that's about as multi-user as it gets.

The NET command is an old lan manager command, essentially, and commands like net use are designed to allow a user to manage their connections, not a sysadmin to manage a machine.

Rob Moir
  • 31,664
  • 6
  • 58
  • 86
  • 1
    IThis explains why it doesn't work but doesn't address the OP question of how he or she can list the drives mounted by all the users. – Rex Mar 10 '14 at 13:45
  • `How do you list the drives mounted by all users on Windows 7?` -- technically it is still just the `net use` command, you just run it twice. Once for the normal user token and once for the admin token. – TheCleaner Mar 10 '14 at 14:11
3

This really probably belongs on SuperUser, but:

You could write a script that searches through the HKEY_USERS hive in the registry. In particular, the HKEY_USERS\<UserSID>\Network has keys for each drive mapped.

Rex
  • 7,815
  • 3
  • 28
  • 44