Microsoft KB Archive/195878

= PRB: MSDN Help Cannot Find Msdn*.col File on Terminal Server =

Article ID: 195878

Article Last Modified on 8/11/2005

-

APPLIES TO


 * Microsoft Windows NT Server 4.0, Terminal Server Edition
 * Microsoft Visual Studio 6.0 Enterprise Edition
 * MSDN Library Subscription

-



This article was previously published under Q195878



SYMPTOMS
After you install Visual Studio 6.0 or the Visual Studio MSDN 6.0 component on Terminal Server, you cannot open the help system. If you press F1 for help in Visual C++, a Help System dialog box appears with one of the following messages:

Attempting to use an invalid help file.

The MSDN collection does not exist. Please reinstall MSDN.

If you load MSDN directly from the Start menu, a Help dialog box appears with the following message:

Cannot open the file: MSDN98\98VS\1033\msdnvs98.col

If MSDN 6.0 or the October 98 edition of MSDN is installed in the normal EXECUTE mode, the following error occurs at the end of setup:

MSDN Setup Error

CloseCollection g_ccolCollection.Open(collectionname) dwError = 1

However, Help functions normally if you manually change to the INSTALL mode in Terminal Server. If you start setup through Add/Remove Programs in the Control Panel, it automatically changes to INSTALL mode.



CAUSE
MSDN does not install properly on Terminal Server, causing this symptom in normal user EXECUTE mode. Because MSDN is the Visual Studio component that provides Help for Visual Studio products, such as Visual C++, Help for these products is unavailable on Terminal Server, unless the installation is modified (see the "References" section of this article for additional information).

Microsoft Visual Studio and the products that are contained in Visual Studio have not been tested with and are not officially supported when you run them on a Terminal Server client using Terminal Server in Windows NT 4.0. (You can, however, write applications with Visual Studio 6.0 that run on Windows NT 4.0 Terminal Server). However, Visual Studio 6.0 is supported on Windows 2000 Terminal Services with full functionality.



RESOLUTION
For each user, copy the Hhcolreg.dat file to a folder named Windows\Help in the user's home directory. MSDN installs Hhcolreg.dat to the Help folder of the Windows NT system root directory. The Help folder is not normally present in the user's home directory Windows folder. You must create it.



MORE INFORMATION
The "Collection file not found in Windows Terminal Server installation" section of the MSDN file Readmedn.htm states:

You can get MSDN to work properly by moving the hhcolreg.dat file from the Windows\Help directory to the specific user profile Help directory. The user profile directory can be found in the Windows\Profiles directory.

This document is somewhat misleading, since it indicates you must move the Hhcolreg.dat file to a user's profile directory, rather than copying it to the Windows\Help path of each user's home directory. Terminal Server stores the location of the user's home directory in the environment variables HOMEDRIVE and HOMEPATH.

For MSDN and Help to work properly, the Hhcolreg.dat file must be present in the \Windows\Help directory. To ensure that it exists, Terminal Server should run the following script at logon for every user:

NOTE: Each "if" line in the code below must be on one line. @echo off

if not exist %HomeDrive%%HomePath%\windows\help mkdir %HomeDrive%%HomePath%\windows\help >nul

if exist %windir%\help\hhcolreg.dat copy %windir%\help\hhcolreg.dat %HomeDrive%%HomePath%\windows\help >nul If you already have logon scripts assigned for your users, you can incorporate the previous script into it. You can copy the script into a globally readable batch file (that is, .bat or .cmd), and either CALL it from an existing logon script or add a shortcut to that file to the Startup group for All Users. The Startup group is located in the following directory:

\Profiles\All Users\Start Menu\Programs\Startup

This approach works no matter where the user's home directory is located.

You might also want to change the "Start in:" directory for MSDN to %HomeDrive%%HomePath%. To make this change, right-click on the MSDN Library shortcut, which is located by default in \Profiles\All Users\Start Menu\Programs\Microsoft Developer Network, click Properties, and then click the Shortcut tab. Modify the "Start in:" field, and click OK.

NOTE: You must run the MSDN setup on the server itself (console) and not from a client terminal onto the server.

Background
Terminal Server creates a separate Windows directory for each user. It searches that directory for initialization files that some applications normally maintain in the  directory. By default, Windows NT maintains a local copy of a user's profile in \Profiles. For a new default installation of Windows NT Terminal Server Edition, the system root is C:\WTSRV. For each user added to or logging into Terminal Server, there will be a Windows directory corresponding to the user name in \Profiles. For example, if a new user named User1 is added to a default installation, Terminal Server creates a directory named as follows:

C:\WTSRV\Profiles\User1\Windows

Terminal Server uses this directory by default as the user's home directory, and sets the environment variables HOMEDRIVE and HOMEPATH to the drive letter and path, respectively, of that directory. However, an administrator can elect to map a user to another home directory. This option is available from the User Manager utility in Administrative Tools (Common).

Use CHANGE USER /INSTALL before installing an application so Terminal Server can determine the files it needs to copy to the user's Windows folder (use CHANGE USER /EXECUTE to restore a user session to normal operating mode). Since Hhcolreg.dat is not a standard .ini file, and the MSDN installation copies it to the Help folder of the system root directory, Terminal Server does not recognize it as a user-specific initialization file. Consequently, the file is not available in the user's home directory where MSDN searches for it.

