JSI Tip 2965. %HOMESHARE% and %HOMEPATH% differences between Windows 2000 and Windows NT 4.0?

Jerold Schulman

October 26, 2000

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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.


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like