Why can't I use RunAs under Windows XP on a program located on a mapped drive?
July 23, 2002
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
You May Also Like