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
This is what I did. First created a batch file at
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.
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.