Access Denied Error Starting Program When Directory Named Program Exists

This article was previously published under Q179147
This article has been archived. It is offered "as is" and will no longer be updated.
When you attempt to start a program from the desktop, the Start menu, ashortcut, or from a file association, you may receive one of the followingerror messages:
Access to the specified device, path or file is denied.
Access to the driver, specified path, or file is denied.
NOTE: This problem only affects programs whose executable files arelocated in folders within the Program Files folder.
These error messages can occur if any of the following conditionsexists:
  • You have a Program folder on the same drive as the Program Filesfolder.
  • You are trying to run a program that does not write quoted path strings containing long file names into the registry. The execution of aprocess is handled by the Win32 CreateProcess() API. CreateProcess() isunable to distinguish between spaces in long file names, and spacesdelimiting arguments to the function. If a quoted string is passed tothe API, CreateProcess() is able to make this distinction and startsthe program as expected.
  • In Windows Explorer, the view option is set to hide DLLs. This is the default setting and should be changed to "Show all Files" if you receive this error message when running a 16-bit program.
To resolve this problem, use the appropriate method below:

Program Does Not Quote Long File Name Paths in the Registry

To resolve this problem, obtain the latest service pack for Windows NT 4.0 or Windows NT Server 4.0, Terminal Server Edition. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
152734 How to Obtain the Latest Windows NT 4.0 Service Pack

A Program Folder Exists on the Same Drive as the Program Files Folder

Rename the Program folder to a name other than Program. To do so, right-click the Program folder in Windows NT Explorer, click Rename, type a newname for the folder, and then press ENTER.
Microsoft has confirmed that this is a problem in Windows NT 4.0 and Windows NT Server 4.0, Terminal Server Edition. This problem was first corrected in Windows NT 4.0 Service Pack 4.0 and Windows NT Server 4.0, Terminal Server Edition Service Pack 4.
This behavior has been known to occur with the Inbox and Internet Explorericon, and with shortcuts pointing to Microsoft Access databases. In addition, if youhave a file on the root folder named C:\Program, the above problems may occur.

For additional information about additional symptoms that may occur, click the article number below to view the article in the Microsoft Knowledge Base:
165763 Windows NT Does Not Recognize a Space in a Registry Value
165763 Windows NT Does Not Recognize a Space in a Registry Value
149533 OLE Problems When Running 16-bit Applications on Windows NT
170669 Creating C:\Program Folder Causes Add/Remove Program to Fail
175653 Err Msg: At Least One Service or Driver Failed...
ole shell open command run context menu office 4.00

Article ID: 179147 - Last Review: 12/05/2015 08:17:18 - Revision: 2.2

Microsoft Windows NT Server 4.0, Terminal Server Edition, Microsoft Windows NT Workstation 4.0 Developer Edition, Microsoft Windows NT Server 4.0 Standard Edition, Microsoft Windows NT Server 4.0 Enterprise Edition

  • kbnosurvey kbarchive kbhotfixserver kbqfe kbbug kbfix kbqfe KB179147