Friday, May 12, 2017

Overriding Active Directory Homedrive and Homepath

Rather frustratingly I am an AD environment which sets a "home path" to a server which has only a 20 Meg file quota which causes trouble for applications which like to use this environment by default and store more than 20 Megs worth of files.

With thanks to here: https://superuser.com/a/1109615

I tried this solution:

Best solution I found was to set variables during login and before userinit.exe.
This is what I did. First created a batch file at C:\Windows\System32\userinit.cmd containing
@ECHO OFF
SET HOMEDRIVE=C:
SET HOMEPATH=\Users\%USERNAME%
SET HOMESHARE=\\localhost\C$\Users\%USERNAME%
@START C:\Windows\system32\userinit.exe
and then changed value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit to C:\Windows\System32\userinit.cmd in the registry.
More information at: https://technet.microsoft.com/en-us/library/cc939862.aspx

This worked fine for windows 10 and except for it being a little disconcerting having a batch file call userinit.exe I think it is ok.







No comments:

Post a Comment