You are using either Vista (ye Gods!) or Win-7.
You have one or more mapped drives to external/networked resources.
You open an elevated command prompt and attempt to do something that requires access to the mapped drive.
Zzzzzzzzt! "We're sorry, but thanks for playing!"
You will notice, rather rapidly, that "you can't get there from here" - that is, the command prompt window cannot see any of your mapped drive letters. To be brutally honest about it, the command window CAN see the mapped letters. . . . it just won't let YOU have them!
(Note that there are reports from people saying that this won't work from a non-elevated command prompt too, but others claim that this is not an issue. Your Mileage May Vary.)
If you search the Web you will see a mighty wailing and gnashing of teeth, with people waiting in line to beat Microsoft senseless over this issue.
There are two workarounds for this issue - though, in my opinion, these are UGLY hacks for a lack of functionality that should exist by default.
- From an elevated command prompt, execute:
net use [letter:] \\[system]\[share]
Note that you cannot use the pre-existing mapped drive letter. The command prompt won't let you use it by default, but complains if you try to map it within the command window. Go figure!
(Ref: http://tinyurl.com/6xlk664 - near the bottom of the page)
- You can edit a Registry key:
by creating the a DWORD value of EnableLinkedConnections and setting it to "1"
Though this works, sources at Microsoft claim that it opens potential security holes to cleverly written malware.
For those of you who are more paranoid about security, or if you want to write batch-files that are portable, I would suggest the first solution. Otherwise, you can make the registry edit and take your chances.
To read all about it, along with Microsoft's response, here's the referenced article, http://tinyurl.com/5sunjbb
that discusses this issue in detail.
Sigh. . . . You're damned if you do, and damned if you don't.
What say ye?