RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.
You may notice that when a process is started within a session running on a Terminal Server (TS) in Application Mode, the home folder of the user might be searched under following conditions:
· If the process needs to load a DLL which is not local to the .exe or in system directories but in the path,
· A TS Home Folder on the network is specified for the user, the search for the DLL also goes to the network location of the TS home folder.
This will happen if the process needs to load a DLL file which is not local to the .exe or in system directories path. If the user has a TS home folder on the network specified for the user, the search for the DLL will also search the network location of the user’s TS Home folder.
“GetWindowsDirectory” API returns on TS in application mode the \windows folder which points to a network share when a TS Home folder is set in users AD properties.
Workaround for non-TS aware applications - depending on application behavior - might be to set a Flags value: "Do not substitute user Windows directory": 0x00000400 as per KB186498
If an application uses the GetWindowsDirectory API to query the Windows directory path, Terminal Server returns the user's home directory.
For more information see the following Microsoft Knowledge base article:
186498 Terminal Server application integration information
Search order on process startup is:
• The directory from which the application loaded.
The current working folder is typically the user's home folder.
• The current directory.
• The system directory.
• The 16-bit system directory.
• The Windows directory.
GetWindowsDirectory function used to get the path of this directory.
• The directories that are listed in the PATH environment variable.
For more information about the search order process at start up see the following Microsoft Knowledge base article:
306850 Programs start slowly or slow logon if the network connection to your home folder is slow
MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.