RunAs different user doesn't work :( [closed]

You can only run an application under an account that exists locally. But as Windows will fallback to using the {username,password} you entered to authenticate on when other methods fail (or are unavailable) there is a work around.

Create a local account with the same name (domain\pure.\pure) and the same password, then run the program that needs network resources under the new local account. You will need to ensure the new local account has access to the local resources it needs also.


Assuming I understand the question correctly:

When you map a domain resource like a network share you need to authenticate to the domain controller, hence you put in your domain username and password as you describe.

But the Visual Studio installed on your PC is a local resource and if your PC does not belong to the domain no domain accounts will have access to it. To run VS you would need to authenticate locally to the SAM on your PC, and obviously this requires a local account. You won't be able to run VS as a domain account unless you have in some way granted domain accounts access to your PC i.e. joined your PC to the domain.

Why do you need to run VS as a domain account? Is it so that VS has access to domain resources? If so just run VS as normal, but map a network drive (any network drive) first, and VS should be able to use domain resources.

JR


Your computer is foreign to the domain, and as such foreign to the fileservers etc. When you map a drive, you supply the foreign resource fileserver with your foreign credentials, the fileserver authenticates with the domain, which works fine because the fileserver is a member of the domain. When you RunAs a local application with foreign credentials, it doesnt work because your workstation cant authenticate with the foreign domain.