Jump to content

RunAs admin needs to be run as Admin to work :P


Go to solution Solved by AdamUL,

Recommended Posts

  • Moderators
Posted
RunAs ( "username", "domain", "password", logon_flag, "program" [, "workingdir" [, show_flag [, opt_flag]]] )

 

It's the 5th parameter.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

It's the 5th parameter.

I guess I'm unclear what the syntax would be then.  I'm trying to run the following:  C:Program Files (x86)ClearCanvasClearCanvas WorkstationClearCanvas.

Desktop.Executable.exe.  Simply running it with admin credentials doesn't work.  I basically need to tell Windows to "run as administrator" wheras The RunAs function doesn't check for admin credentials.  I'm trying to do what AdamUL said needs to be done and that is run the script twice ("The first step is to restart the script to run under the admin account, then restart it again to request the admin token").  Any ideas or help would be very much appreciated.  Thanks.

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
  • Recently Browsing   0 members

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