Jump to content

Admin Workstation Toolkit


Recommended Posts

In the code you will want to change the domain to yours before compiling the code

Func AuthAdmin()

GUICreate("Admin Login",200,100)

$user = GuiCtrlCreateInput("", 25, 25, 130, 20)

$pass = GUICtrlCreateInput("",25, 45 + $top0, 130, 20, 0x0020)

$enterbtn =GUICtrlCreateButton("Enter", 25, 65, 70, 20)

GUISetState()

$msg = 0

While $msg <> $GUI_EVENT_CLOSE

$msg = GuiGetMsg()

Select

Case $msg = $Exitbutton

ExitLoop

Case $msg = $enterbtn

$UserName = GUICtrlRead($user)

$PassWord = GUICtrlRead($pass)

$runout = RunAs($UserName, "YourDomainHere", $PassWord, 0, $AppName, @SystemDir)

If @error Then

MsgBox(1,"Login Error","Incorrect Credentials provided.")

GUIDelete()

Else

GUIDelete()

EndIf

ExitLoop

EndSelect

WEnd

EndFunc

WksAdmin.au3

Link to comment
Share on other sites

With his last post, he only has a total of 4. He couldn't quite get it there yet. One more post, and then he could have.

It's a nice script, looks very helpful. Only thing I'd do different, would be to remove where it statically puts the file to C:\temp (I don't have that directory), and the Images path used in the script also might not exist on a computer without AutoIt, so embedding that/sending it with the program might be a good option.

Link to comment
Share on other sites

With his last post, he only has a total of 4. He couldn't quite get it there yet. One more post, and then he could have.

It's a nice script, looks very helpful. Only thing I'd do different, would be to remove where it statically puts the file to C:\temp (I don't have that directory), and the Images path used in the script also might not exist on a computer without AutoIt, so embedding that/sending it with the program might be a good option.

I understand your point, I will in the future remove the dependancy in the script

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