Jump to content

AutoIt3 exe. Run As..


Daywap
 Share

Recommended Posts

Daywap, AutoIt can natively run and shutdown programs, you don't need to open command line to accomplish this. Look up the helpfile for RunAs() and RunAsWait(). You can tell AutoIt explicitly to open the executable as Administrator. As for whether or not it will default to Administrator without this - I cannot say, maybe somebody else can answer.

Link to comment
Share on other sites

Hi, if i compiled to exe autoit script, and run as administrator that do that: opens cmd and opens file named "tet.exe". Tet.exe is not created by autoit.. Does tet.exe will be opened as administrator?

If I read your question correctly the answer is yes, permissions are carried. Example may be, if you run Windows Explorer as and Administrator, they the folders you can see, programs you can run are all done as Adminstrator as long as they are done within that Windows Explorer window. (Same applies to a user in the Administrator's group). Just be careful with it, RunAs is there for a reason, you should only use it when it is required.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

  • 2 weeks later...

I'm new to this autoit as well, and this is my take on it...

if you have #RequireAdmin in your autoit script that opens the cmd screen, then providing the prompt has C:\Administrator....... then it should open your tet.exe program as admin.

feel free to scrutinise my advice as it would be a good way for me to learn ;)

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...