Why can't I use RunAs under Windows XP on a program located on a mapped drive?

John Savill

July 23, 2002

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

A. XP's implementation of the RunAs command lets you execute a program under the context of another user. However, if you attempt to use RunAs on a program located on a mapped drive, XP enforces mapped-drive credentials and displays one of the following error messages:

  • RUNAS ERROR: Unable to run - :.exe 3: The system cannot find the path specified.

  • The application failed to initialize properly (0xc0000022). Click on OK to terminate the application.

These errors result because mapped-drive connections use the security context of the currently logged-on user, and RunAs can't use this security context because RunAs is attempting to run programs under another user's security context. To resolve this problem, you need to use a Universal Naming Convention (UNC) name instead of a mapped drive. For example, instead of using

runas /user: h:progsdelold.exe 

use

runas /user: \server1share1progsdelold.exe

Unlike XP, Windows 2000's RunAs implementation doesn't enforce the mapped drive credentials, so a Win2K user can access a mapped drive using another user's security context.

About the Author

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