Sign in to follow this  
Followers 0
cad29

Script that provide local admin rights to PC

7 posts in this topic

Hi Im new in autoIT v3 does anyone have a script or idea how to make a script to provide local admin rights to the PC?Thanks

Share this post


Link to post
Share on other sites



Provide to whom? And based on what authentication?

:x

He means provide the AutoIt software to users in a different class than Administrator. Which I doubt know he's not going to get any help with this from anyone here.

Share this post


Link to post
Share on other sites

If you are using XP you can Google "MakeMeAdmin.cmd", which is a command line batch file which you can use to use to open an Administrator enabled command prompt. This relies that you know the username and password of an Admin account on the local machine. If you are trying to somehow go around the security and hack into an Admin account, there are several paid apps which can do that, but nothing here.

Share this post


Link to post
Share on other sites

Thanks for the reply guys.Im admin and I usually provide admin rights to the user manually by going to lusrmgr.msc and then add their username in the administrator group but I want to do this one automatic if it is possible thanks.

Share this post


Link to post
Share on other sites

Thanks for the reply guys.Im admin and I usually provide admin rights to the user manually by going to lusrmgr.msc and then add their username in the administrator group but I want to do this one automatic if it is possible thanks.

Change the variables to the appropriate values
Local $AdminAccount = 'YourAdmintratorAccount'
Local $Domain = 'YourDomain'
Local $Password = 'YourPassword'
Local $UserToAdd = 'Domain\Username'

RunAs($AdminAccount, $Domain, $Password, 2, 'net LocalGroup Administrators /add "' & $UserToAdd & '"', '', @SW_HIDE)

Share this post


Link to post
Share on other sites

Thanks a lot Varian

Share this post


Link to post
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
Sign in to follow this  
Followers 0