JSI Tip 2965. %HOMESHARE% and %HOMEPATH% differences between Windows 2000 and Windows NT 4.0?
October 26, 2000
In Windows 2000, the %HOMESHARE% environment variable is the fully qualified path to your server based profile,
\ServerNameShareNameFolder1Folder2HomeFolder. %HOMEPATH% contains a final backslash,
for compatibility with previous systems. When mapped to %HOMEDRIVE%, user can access their home directory and subdirectories, but can NOT see or access the parent folder.Example:
%HOMESHARE% - \ServerNameShareNameFolder1Folder2HomeFolder
%HOMEDRIVE% - Z:, mapped to \ServerNameShareNameFolder1Folder2HomeFolder
%HOMEPATH% -
In Windows NT 4.0, %HOMESHARE% stores the network share, \ServerNameShareName. %HOMEPATH% stores the remainder of the path, Folder1Folder2HomeFolder. User can access any folder on the home share, unless the hidden share approach in tip 0400 is used. Example:
%HOMESHARE% - \ServerNameShareName
%HOMEDRIVE% - Z:, mapped to \ServerNameShareName
%HOMEPATH% - Folder1Folder2HomeFolder
If you have scripts written for Windows NT 4.0, you might want Windows 2000 to use the Windows NT 4.0 method of defining %HOMESHARE% and %HOMEPATH%. A Group Policy, Connect home directory to root of the share at User ConfigurationAdministrative TemplatesSystemLogon/Logoff, has been created to do that. You can also implement it by using Regedt32 to navigate to:
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem
On the Edit menu, Add Value name ConnectHomeDirToRoot, as a REG_DWORD data type. A data value of 0, the default, implements the Windows 2000 definitions. A data value of 1, implements the Windows NT 4.0 definitions.
About the Author
You May Also Like