Jump to content

CMD Question


Recommended Posts

I am new to AutoIt and I am sorry if this question has already been addressed elsewhere but I couldn't find it. What I am trying to do is to create a script that will run a cmd prompt with elevated privileges. First off, I am a domain admin and domain admins are administrators on the test machine. I have tried runas and that hasn't worked for me (might simply be a syntax problem, not sure). Would you mind posting some snippets with how you deal with this issue? BTW, the test machine is Win 7 x64 Enterprise. Eventually this will be deployed using SCCM so I need the script to elevate the privileges on it's own and, eventually, silently.

Thanks

Clay

Link to comment
Share on other sites

By the lack of response I can deduce one of two things either (1) this gets asked all the time and nobody wants to respond or (2) there is no way in the programs current state to do this. Would someone mind cluing me in so I can either look harder or quit looking all together.

Link to comment
Share on other sites

If you're already running in the Domain Admin's security context, you don't need additional perms. Don't SSCM tasks run (or can be configured to run) in that context?

:blink:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

If you're already running in the Domain Admin's security context, you don't need additional perms. Don't SSCM tasks run (or can be configured to run) in that context?

:blink:

I was trying to get the script to run without adding the complexity of SCCM but, now that you mention it, SCCM may be the way to go. I will reimage the computer and try it out. Out of curiosity, is there a way to code the permissions into the script?

Edit

Oh and I was getting permission errors when running it. I will double check permissions on the image when it finishes it's imaging.

Edited by ClayB
Link to comment
Share on other sites

The error I am getting is

Error: 0xC004F025 Access denied: the requested action requires elevated privileges.

When I right click and "run as administrator" I don't get the error. So I need the script to run as administrator.

**Edit**

Never mind, looks like #RequireAdmin fixed it.

Edited by ClayB
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...