Jump to content

Runas Function


Pook
 Share

Recommended Posts

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

  • Developers

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...