Pook Posted January 30, 2011 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") )
Developers Jos Posted January 30, 2011 Developers 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.
Pook Posted January 30, 2011 Author Posted January 30, 2011 That worked! Thanks Runas ("ACCOUNT", "Domain", "Password", 2, (@ComSpec & " /c Explorer /root,\\Domain\Share\Folder") )
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