JSI Tip 7833. When you use RunAs to launch CMD.EXE or NotePad.exe in Windows XP or Windows Server 2003, you receive 'The directory name is invalid'?
March 14, 2004
When you use the RunAs feature to launch CMD.exe or NotePad.exe, you receive one of the following:
C:Windowssystem32cmd.exe The directory name is invalid.
C:Windowssystem32Notepad.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%, FolderName, etc...
3. Press OK.
About the Author
You May Also Like