That is correct the behavior of symbolic links has changed in Windows XP
as opposed to NT 4 and Windows 2000 (Actually, it changed between those
as well).
There actually is a way to revert the behavior of the mapping through a
registry value however I do not believe it is recommended. The new
method is through LUID mappings so per-user devices are mapped into a
LUID space and global mappings still occur in the ?? Space.
Previously, everyone would get their own copy of global (non-console
users, console users used global directly as far as I remember) and
could modify it without conflict. Now, everyone gets their own LUID
mapping and they can override or add new mappings to this area as it
will be checked first, then global.
You can view the different mapping locations using WINOBJ. To get
around not being able to map globally for all users on the system you
would either need a service that you could LPC to perform this on your
behalf, or a driver that could create symbolic links for you.
I have also noticed that “net share” would never work on subst drives in
XP when they would in 2000 and this is probably the reason. To get more
information though I would suggest that you debug these APIs and see why
the fail and how they are working. Perhaps they enumeration drives
using the global, perhaps they call GetDriveType(), or any number of
reasons. You could even debug DefineDosDevice and see how it’s working
but obviously the documentation states that you need to be running in
system to map to the global devices.
The problem with NetShareAdd() is perhaps that it may talk to a service
and that service (running in one particular session in SYSTEM context)
can’t see per-user configurations since it runs in system and as such
only sees the global.
This whole “luid” implementation is basically for fast user switching,
each user can map their own specific drives, I mean if one user does
“net use” you don’t want the other user to use it so it’s user specific.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of J Sukh
Sent: Tuesday, September 13, 2005 4:17 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] DefineDosDevice on Windows 2003
I am going to ask a question that has been asked
before on this newsgroup in 2003 by someone but I have
not seen an answer for it. I am having a very similar
problem to the issue that was raised.
"…
Looks like WinXP is policy change w.r.t
DefineDosDevice().
The URL is -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/
base/defining_an_ms_dos_device_name.asp
According to the url “The visibility of an MS-DOS
device names is
categorized as Global or Local MS-DOS Device
Namespace. Note that only
processes running in the LocalSystem context can call
DefineDosDevice to
create an MS-DOS device in the Global MS-DOS device
namespace.”
My application uses DefineDosDevice() that does not
execute in the
LocalSystem context. Due to this on Win 2003, it
creates a device name in
Local MS-DOS device namespace. Now, when I try to
share this drive, the
NetShareAdd() API returns an error:"The device or
directory does not
exist. " My assumtion is that this error is returned
because NetShareAdd()
is searching for the device name in the Global MS-DOS
Device Namespace and
it does not exixt there.
My question is that how do I allocate MS-DOS drive
letters in the Global
MS-DOS Device namespace as I am not running in Local
System context? Can I
make the process change to LocalSystem context
temporarily ?
…"
In addition to the problem above I cannot even see the
drive letter in explorer after the call to
DefineDosDevice when my service does not run in local
system context.
When I switch to local system context everything gets
to work just fine.
Any help would be greatly appreciated.
-Jeff
Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@opferman.com
To unsubscribe send a blank email to xxxxx@lists.osr.com