Skip navigation

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

In Windows 2000, the %HOMESHARE% environment variable is the fully qualified path to your server based profile,
\\ServerName\ShareName\Folder1\Folder2\HomeFolder. %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% - \\ServerName\ShareName\Folder1\Folder2\HomeFolder
%HOMEDRIVE% - Z:, mapped to \\ServerName\ShareName\Folder1\Folder2\HomeFolder
%HOMEPATH%   - \

In Windows NT 4.0, %HOMESHARE% stores the network share, \\ServerName\ShareName. %HOMEPATH% stores the remainder of the path, \Folder1\Folder2\HomeFolder. User can access any folder on the home share, unless the hidden share approach in tip 0400 is used. Example:

%HOMESHARE% - \\ServerName\ShareName
%HOMEDRIVE% - Z:, mapped to \\ServerName\ShareName
%HOMEPATH%   - \Folder1\Folder2\HomeFolder

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 Configuration\Administrative Templates\System\Logon/Logoff, has been created to do that. You can also implement it by using Regedt32 to navigate to:


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.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.