Pook Posted January 30, 2011 Share Posted January 30, 2011 I guess I don’t understand how to use the RunAs command. I’m making a GUI that will let some of my Helpdesk users connect to a remote share using different credentials. (Users Home Drives on a Server) The problem is that the ShellExecute command never uses the account information provided for it in the RunAs command. Any ideas that I’m missing?? I just want the command to open the folder in an explore window. Runas ("ACCOUNT", "Domain", "Password", 2, ShellExecute ("\\Domain\Share\Folder") ) Link to comment Share on other sites More sharing options...
Developers Jos Posted January 30, 2011 Developers Share Posted January 30, 2011 ShellExecute() is an Autoit3 Function, not a program to run with the new credentials. Use @comSpec when you need the cmd.exe to run the target program/file. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Pook Posted January 30, 2011 Author Share Posted January 30, 2011 That worked! Thanks Runas ("ACCOUNT", "Domain", "Password", 2, (@ComSpec & " /c Explorer /root,\\Domain\Share\Folder") ) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now