Below are some hacks I've developed. They are not elegant, but may be functional in your corporate environment.
HOMEDRIVE Only
It seems that many applications only use HOMEDRIVE / HOMEPATH. In that case, you can create a startup script that remaps the base drive letter to your local user path via the UNC drive admin path:
set HOME
HOMEDRIVE=G:
HOMEPATH=\
HOMESHARE=\\Server\Users\username
net use g: /delete
net use g: \\localhost\C$\Users\username
HOMEDRIVE Local Default
If you do not need to access "Server" by name at all, you can cause the group policy setting to fail and fall back to your local machine. The easiest way to do this is to add an entry to C:\Windows\System32\drivers\etc\hosts like:
127.0.0.1 Server
After rebooting, you should see something like:
set HOME
HOMEDRIVE=C:
HOMEPATH=\Users\username
HOMEDRIVE/SHARE with Hybrid Local/Remote UNC Paths
If you want access to "Server" by name for some UNC paths, but override others with local paths, I have developed the following abomination. Note: direct server connections to "Server" will still resolve to your local machine. I recommend this solution only if "Server" is only a file server:
Modify C:\Windows\System32\drivers\etc\hosts to redirect "Server" to your local machine:
127.0.0.1 Server
Add the following Multi-String registry value to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0 to allow credentials to be passed to the local UNC path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0\
BackConnectionHostNames = Server
Create a dummy directory that will serve as the root of Server:
set DUMMY_LOC=C:\Server_Dummy
mkdir %DUMMY_LOC%
cd /D %DUMMY_LOC%
For each UNC path you want to direct to the real Server:
rem Alternatively you can use an IP below, but it is more likely to break if DNS changes
set SERVER_FQDN=Server.network.blah.com
rem Take a look at what's available...
net view \\%SERVER_FQDN%\
mklink /D Remote_Example \\%SERVER_FQDN%\Remote_Example
net share Remote_Example=%DUMMY_LOC%\Remote_Example /grant:everyone,FULL
For each UNC share you want to define locally (such as Users):
rem The link isn't really necessary for the share, I just find it easier to manage when all of these hacks are in the same directory
mklink /D Users C:\Users
net share Users=%DUMMY_LOC%\Users /grant:everyone,FULL
Reboot
For the example, this would allow the following UNC paths to be resolved:
\\Server\Remote_Example => \\Server.network.blah.com\Remote_Example
\\Server\Users => C:\Users
This path resolution should occur prior to drive mappings. As long as the UNC paths associated with the mappings are valid (be they local or remote), drive letters should behave as expected.
For example, in my setup the following variables are forced by the domain:
set HOME
HOMEDRIVE=G:
HOMEPATH=\
HOMESHARE=\\Server\Users\username
But due to my mappings, the result is:
G: => \\Server\Users\username => C:\Users\username
2Your IT department have set these policies for a reason. If you have tried to work it out with them and they have refused to change it there's probably a good reason. If you then continue to ignore their advice and go against what they've asked prepare for disciplinary action if you're caught. – Joe Taylor – 2011-03-10T15:16:31.970
30After over 30 years in this industry, I've learned that IT policy for the average PC user is often inadequate (or even obstructive) for developers and power users. IT often has had to accommodate the needs of developers differently, and if this is another such learning experience for them here, then I'm glad to help. I'd love to hear a valid business reason for making a user's home directory unusuable. – MykennaC – 2011-03-10T15:32:23.283
2The why not escelate the problem, show it is unworkable for certain users and propose a separate GPO for such users. Moving in this constructive way is far more likely to work than trying to bypass the domain policies with hacks. – Joe Taylor – 2011-03-10T16:17:05.760
I don't disagree, and I haven't given up on working with IT. The ball is in their court at the moment (and has been for almost 2 weeks). I've stated my need clearly. Regardless, I need to get my work done. Since it's a problematic (rather than blocking) issue, I'm waiting to escalate until my ticket expires or gets closed. But even that doesn't guarantee results, since my ticket owner is the IT manager. Thanks for the comments. – MykennaC – 2011-03-10T16:35:10.047
6IT finally got back to me. They aren't going to change anything. Yes, official company policy is to provide a user home directory where I am not allowed to create files. Windows applications that attempt to use the default user home directory for things like preference files will fail. Is there no wizard here who can offer me some workaround to this? – MykennaC – 2011-04-05T16:49:43.347
if it is indeed company policy and your IT department refused to offer an exception: do not mess with it if you value your job. – Lorenzo Von Matterhorn – 2013-04-03T21:57:29.610
3yes @D0rf, he should roll over and just take it. If IT makes your job impossible, you need to fight and raise a fuss until it is changed. If you're a passive developer, then you deserve your lot in life at a terrible company that doesn't give you the tools you need for your job. – Scott – 2013-05-02T17:10:42.247
@D0rf: My sympathy, if you're in a position so difficult that a job like that could actually have value for you! – Michael Scheper – 2014-03-18T06:32:09.710
1I found a way to completely avoid this problem: Kobayashi Maru. When my laptop got old and needed replacing, I asked for a MacBook Pro Retina. Give me a unix prompt, and I'm a happy, happy girl. – MykennaC – 2014-04-04T19:36:58.030