Jump to content
Sign in to follow this  
RogFleming

Admin Workstation Toolkit

Recommended Posts

RogFleming

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

Share this post


Link to post
Share on other sites
RogFleming

so, what is your issue? You never asked a question.

Sorry,

Just offering it up to community, please move as needed.

Share this post


Link to post
Share on other sites
SkinnyWhiteGuy

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.

Share this post


Link to post
Share on other sites
RogFleming

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

Share this post


Link to post
Share on other sites
surferdog

What's supposed to happen? I get nothing.

Share this post


Link to post
Share on other sites
RogFleming

What's supposed to happen? I get nothing.

Look in the System tray your should see a Globe icon.

Share this post


Link to post
Share on other sites
RogFleming

Look in the System tray your should see a Globe icon.

sry an autoit icon, right click will show menu

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.