Sign in to follow this  
Followers 0
ashley

login...

14 posts in this topic

is it possible... to make a gui with 2 input boxes...

Where people can put a username and password...

The username and password would be somewere else so when compiles it works as well... any idears

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

ummm...yeh...sounds doable. Here is something to start with that may help you out.

#Include <GUiConstants.au3>
    
    ;Create GUI
    $Main = GUICreate('Collect Username and Password', 300, 100) 

    Opt("GUICoordMode",1)
    $username = GUICtrlCreateInput('',100,20,100)
    $usernamelabel = GUICtrlCreateLabel('Username',30,23)
    $password = GUICtrlCreateInput('',100,45,100,0,$ES_PASSWORD)
    $passwordlabel = GUICtrlCreateLabel('Password',30,48)
    $Button_1 = GUICtrlCreateButton ("OK",  190, 70, 0, 0, 0x0001)
    $Button_2 = GUICtrlCreateButton ("Exit", 245, 70, 0, 0)

    GUISetState ()
    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                Exit
            Case $msg = $Button_1
                GLOBAL $collectusername = GUICtrlRead($username)
                WinSetState('Collect Username and Password','',@SW_HIDE)
                GLOBAL $collectpassword = GUICtrlRead($password)
                MsgBox(0,'Username and Password','Username: ' & $collectusername & @CRLF & 'Password: ' & $collectpassword)
                ExitLoop
            Case $msg = $Button_2
                Exit
        EndSelect
    Wend
Edited by dufran3

Share this post


Link to post
Share on other sites

I have my tool just prompt for their logged on password. Using their logged on ID and their password I verify the password against AD. If that comes back ok I then verify that they are part of a Global Group in AD. If that comes back ok then they can use the tool. Otherwise they get a response that either the password was incorrect or they are not authorized to use the tool.

This way I don't have to administer a password list or a list of users that are permitted. If you are part of our group and you are in the global group in AD then you are good to go to use the tool.

Share this post


Link to post
Share on other sites

ummm...yeh...sounds doable. Here is something to start with that may help you out.

#Include <GUiConstants.au3>
    
    ;Create GUI
    $Main = GUICreate('Collect Username and Password', 300, 100) 

    Opt("GUICoordMode",1)
    $username = GUICtrlCreateInput('',100,20,100)
    $usernamelabel = GUICtrlCreateLabel('Username',30,23)
    $password = GUICtrlCreateInput('',100,45,100,0,$ES_PASSWORD)
    $passwordlabel = GUICtrlCreateLabel('Password',30,48)
    $Button_1 = GUICtrlCreateButton ("OK",  190, 70, 0, 0, 0x0001)
    $Button_2 = GUICtrlCreateButton ("Exit", 245, 70, 0, 0)

    GUISetState ()
    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                Exit
            Case $msg = $Button_1
                GLOBAL $collectusername = GUICtrlRead($username)
                WinSetState('Collect Username and Password','',@SW_HIDE)
                GLOBAL $collectpassword = GUICtrlRead($password)
                MsgBox(0,'Username and Password','Username: ' & $collectusername & @CRLF & 'Password: ' & $collectpassword)
                ExitLoop
            Case $msg = $Button_2
                Exit
        EndSelect
    Wend

urm.. yea... i want the first bit.. but not the second...

can you make it so it will caome up with incorect passsword.. if its incorect... and if correct will go to then next gui

Share this post


Link to post
Share on other sites

My tool is used in a Domain environment where people login to domains. my tool takes advantage of this environment so that I don't have to keep track of passwords and such. As long as the user is part of a specific global group in the Active Directory then they are allowed to use it. Should they move to another organization they would be removed from this group and would no longer be able to use this tool. Otherwise if I was to provide a hard coded password in the tool then who knows how far it would go.

Is your tool going to be used by a specific group of people? in a Domain environment?

Share this post


Link to post
Share on other sites

My tool is used in a Domain environment where people login to domains. my tool takes advantage of this environment so that I don't have to keep track of passwords and such. As long as the user is part of a specific global group in the Active Directory then they are allowed to use it. Should they move to another organization they would be removed from this group and would no longer be able to use this tool. Otherwise if I was to provide a hard coded password in the tool then who knows how far it would go.

Is your tool going to be used by a specific group of people? in a Domain environment?

it will be a login Username and password.. to a GUI

For excample..

User: ash

Pass:boo

1 GUI

User: boo

Pass: ash

A diffrent GUI...

The guis will be how they want... inolther word... a safe...

and i could do with it checking form a ini file...

which is hiden in a file in programs...

Share this post


Link to post
Share on other sites

I am not going to write your GUI for you. All i did was show you basic concept of how to create a GUI and input controls. I'm sorry but I don't have the time to modify this for you. Check the documentation and mold what I gave you to fit your needs.

Share this post


Link to post
Share on other sites

I am not going to write your GUI for you. All i did was show you basic concept of how to create a GUI and input controls. I'm sorry but I don't have the time to modify this for you. Check the documentation and mold what I gave you to fit your needs.

just tell me how to make it check for the password

thanks for your help anyways,,,

Share this post


Link to post
Share on other sites

Check for the password. What is it supposed to be checking against? The windows login? AD?

Share this post


Link to post
Share on other sites

Check for the password. What is it supposed to be checking against? The windows login? AD?

the password that they set....

Share this post


Link to post
Share on other sites

ummm...The password that they set? are they creating a password? I have no idea what you are talking about. I can't be much help without more information.

Share this post


Link to post
Share on other sites

i am not too sure if i understood you but if you want to check the password of a user try RunAsSet() and use the password option..

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