18Aug Run As - “The directory name is invalid”
Windows Administrators will often need to start applications as another user in order to gain the privileges necessary to perform administrative tasks. Here’s how to fix the error that may appear that says the directory name is invalid.
When you right-click a shortcut, select “Run As” and enter your credentials you may receive an error that looks like the following.

What does this mean? It means that the shortcut you’ve tried to run has tried to access a “Start in” folder that it can’t find or doesn’t have access to. For example, the default properties for the command prompt shortcut look like this.

You can see that the “Start in” field has a value of %HOMEDRIVE%%HOMEPATH%. If you are running the shortcut as a user that can’t find that path, the above error will occur.
How do you fix it?
The best way is to change the properties of the shortcut so that the “Start in” folder points at a system-wide variable or folder that you know ALL users can access. I’d recommend %WINDIR%, as follows.

Problem solved!
Note: I’ve found this to also be a problem with the shortcut for Windows Powershell.

