syntax
RUNAS [/profile] [/env] [/netonly] /user: program
key
/profile Option to load the user's profile (registry)
/env Use current environment instead of user's.
/netonly Use if the credentials specified are for RAS only.
/user Username in form USER@DOMAIN or DOMAIN\USER
(USER@DOMAIN is not compatible with /netonly)
program The command to execute
You seemingly cannot do this for one major reason. The operating system won't let you open explorer.exe under multiple credentials (the only time it lets you is if you access an administrative share). Here's the trick I have been using for years to get around this problem. Use Internet Explorer instead of Windows Explorer. I just do a Runas on Internet Explorer then change it to Folder view and use it like Explorer. There ya go..nothing to it.
Thanks everyone. bcastner - I tried your suggestion and it prompts for a password and then displays an 'attempting to connect to...' message - but the folder doesn't open.
Internet Explorer's location is not typically in the path statement so you will need to provide the complete path to it. i.e
runas /noprofile /user:domain\username "C:\Program Files\Internet Explo
rer\Iexplore.exe \\server\share\folder
My testing resolves iexplore, but I think you may be right that a full pathing is advisable. I would still suggest adding the -e command line parameter.
What troubles me is that the message returned to the poster was "'attempting to connect to...'", which suggests that the iexplore was resolved, but the sharename was not.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.