Jump to content

RunAsSet() with the System Account


Recommended Posts

I have just found AutoIT and have been attempting to inhale as much info as my brain can take before demanding a time-out.

I am running v3.2.2.0.

My question: Can I use RunAsSet() to execute a script using one of the following accounts: Local System, Local Service, or Network Service...NOT a user account.

Why you ask? The organization I do work for changes all Local Admin accounts extremely frequently. Attempting to run a script using the Local Admin account may not be dependable. Also, they will not authorize the creation/use of a Domain Service account. (Fun, huh?)

I have read http://www.autoitscript.com/autoit3/docs/f...ns/RunAsSet.htm and understand the parameters and searched the forum.

I seemingly tried the first obvious options...

#1

; Set the RunAs parameters

RunAsSet("SYSTEM", @Computername,"") ; Same results using "LocalService" and "NetworkService"

; Run registry editor

RunWait("regedit.exe")

; Reset user's permissions

RunAsSet()

It tells me to go "soak it in the snow"...or rather "Logon failure: unknown user name or bad password."

#2

; Set the RunAs parameters to fail again and again

RunAsSet("SYSTEM", "NT AUTHORITY,"") ; Same results using "LocalService" and "NetworkService"

; Run registry editor as admin

RunWait("regedit.exe")

; Reset user's permissions

RunAsSet()

Again..."Logon failure: unknown user name or bad password."

#3

; Set the RunAs parameters to fail again and again

RunAsSet("SYSTEM", @Computername) ; Tried it without the password despite it being a mandatory argument.

; Run registry editor

RunWait("regedit.exe")

; Reset user's permissions

RunAsSet()

Again, my computer tells me I don't have clue and should get a job at a car wash...or rather "Incorrect number of parameters in function call."

Does RunAsSet() support the SYSTEM, LocalService, or NetworkService accounts?

If so, can anyone provide me a stream of consciousness?

If not, does anyone know of another way?

Thanks!

Respecfully,

Dazed and Confused (aka John Metzler)

Link to comment
Share on other sites

Doesn't look like it works, found this thread on the forum:

http://www.autoitscript.com/forum/index.ph...ost&p=45470

Not sure if Jon was ever able to fix it and make it work again though. There are other ways to get things to run as system, though they are far from conventional. :whistle:

I would suggest you email and/or PM Jon regarding this matter and make sure you include the link that I gave you while asking him if he was ever able to get the RunAsSet() function so that it could once again run programs as System.

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

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