Naveen_Naveen

Windows Security Logon ISSUE

7 posts in this topic

#1 ·  Posted

Hello guys.

 

I have a small issue that i am facing that really bugs me. It seems to be a small issue but i am not able to find the solution. Maybe Forum Members eyes are better and you guys can spot the error.

 

So . I have written a script where I open Windows Explorer and navigate to a specific IP address (of a server). Up until this point it works fine. 

But once the IP is accessed, the "windows security" dialog box opens up asking me to enter the username and password (which is normal)

Although the windows is active, I am not able to send the username and password to the dialogbox and autoit refuses to react. Once i close the window by clicking cancel or ok, then autoit contiues with the script and enters the username and password in the script page. 

This is really bugging me. Here is a sample of my code. If anyone can help me with this regards would be awesome.

 

 

Global $Path = '\\'&'IP Address'&'\c$'
Global $username = "username"

Global $password = "password"

ShellExecute($Path)
send($username )

Send(Enter)

Send ($password)

 

 

This is just a sample code. 

Autoit navigates to the correct ip address. else it would not ask me for the username and password.

I tried also getting the title of the window which is also not possible. !!!!!!!!!

Please.. I need help here :)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Why not make it easier and do an DriveMapAdd() command in the script to make de share available? This also avoids the explorer window popping up with its security prompt.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

can you please give an example of how you would go about doing this ? 

 

Edited by Naveen_Naveen

Share this post


Link to post
Share on other sites

#4 ·  Posted

I tried it like this. But this doesnt work either. There is no mapped network too !!!!!!!

AHH:: i am going nuts with this issue

 

Local $ping = Ping("IP address", 150)
If $ping Then
    if DriveStatus("Y:\") = "INVALID" Then

       DriveMapAdd("Y:", "\\IP address\c$" , "" , "[administrator]" , "[password]" )

    EndIf

 Else

    if DriveStatus("Y:\") = "UNKNOWN" Then

       DriveMapDel("Y:")

    EndIf

EndIf
 

Share this post


Link to post
Share on other sites

#5 ·  Posted

yep.. got it to work.. just had to concatnate the IP address when i enter it. 

But strange is, if the drive already exists, then the mapping doesnt work and the code exits automatically. It is needed to delete the drive first and then map a new ip to that drive.. strange. Because there ll be some other people who will also be using my code. and if they have something important in say "Y" drive which i would delete, then it could be a problem 

any workaround for this from anyone  ?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Per the help file, if you specify '*' in the first parameter it will map an unused drive letter.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

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