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

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 - <drive>:\<path>\<filename>.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:<domain>\<user name> h:\progs\delold.exe 
runas /user:<domain>\<user name> \\server1\share1\progs\delold.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.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.