Home > Computers and Internet > The system cannot find the drive specified

The system cannot find the drive specified

The other day, one of my team members had a problem accessing a mapped drive from an elevated Command Prompt in Windows Server 2008 R2.  It was successfully mapped and accessible from within Windows Explorer, however when attempts to open it via this elevated Command Prompt were done, we got the error message “The system cannot find the drive specified.”

We later discovered that using a non-elevated Command Prompt (no Administrative rights) would enable us to access said mapped drive.

So, what happened here?

The best explanation I could find has to do with the security tokens assigned to mapped drives. For security reasons, all devices are associated with an authentication ID (LUID), which is an ID generated for each logon session. Mapped drives are associated with LUIDs. Elevated applications have a different LUID generated during a separate login event, and as a result of this, cannot see the mapped drive. In other words, the LUID of the user is different from when that user elevates an application, and this new session loses access to whatever drives were created from the original, non-elevated LUID session.

The solution: If you need to access a mapped drive with elevated rights, then be sure that it is mapped in the first place using elevated rights.

Reference: Mapped Network Drives with UAC on Windows Vista by Chris Jackson – http://blogs.msdn.com/b/cjacks/archive/2007/02/19/mapped-network-drives-with-uac-on-windows-vista.aspx

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: