Using %USERNAME% in a DFS link path

So I was reading on technet social a question about using environment variables in DFS paths. In this case he wanted to use the %username% variable. I have also thought about how nice that could be, a little magic. And all users could have the same URN for there homedirectory. Just think how nice \\domain.local\dfs\MyHome feels. Well on with the blog, you cant. It doesn’t work.

To understand what kind of problems we are facing we need to look into how DFS works:

When a client asks for an UNC path (all paths starting with \\), windows will deliver the request to mup.sys (multiple UNC provider). Mup.sys is responsible for sending the request to the correct driver. Or in the case of DFS resolving the path to the correct path and then sending it to the correct driver.

So now we know that mup.sys would need to do the translation. But where in my system is mup.sys? There is a service called mup.

And since this is a service that does the conversation from DFS to physical UNC path using user environment variables don’t work.

Leave a Reply