When you use the RunAs feature to launch CMD.exe or NotePad.exe, you receive one of the following:
C:\Windows\system32\cmd.exe The directory name is invalid.
C:\Windows\system32\Notepad.exe The directory name is invalid.
If the Start in is set to %HOMEDRIVE%%HOMEPATH%, you will experience this behavior, as these operating systems prohibit using RunAs to access the logged-on users mapped home drive. Windows XP and Windows Server 2003 treat the two instances of the same user name as two different local users.
To workaround this behavior:
1. Right-click Command Prompt or Notepad in the Accessories folder of your start menu (and any other place you launch from) and press Properties.
2. Change the Start in value from %HOMEDRIVE%%HOMEPATH% to a system-wide (non-user) value, like %SystemRoot%, %WinDir%, <Drive:>\FolderName, etc...
3. Press OK.