Click here to Skip to main content
15,867,835 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a problem to make a program for autologin my router

if I open a connection example : 192.168.1.1 (this is my router IP Address) using a button with process.start ()

I can not get my router menu HTML pages. because the router ask for the user name and password

How can I send my User Name and Password with VB automatically?

can somebody help me?

Thanks.
Posted
Updated 31-Jan-18 2:59am

1 solution

Bear in mind that whatever you do will probably only work for your specific router, changing to mine will probably mean your app will need changing.

Keep a reference to the process you start, and you can use Sendkeys:
VB
Dim h As IntPtr = theProcessIJustStarted.MainWindowHandle
SetForegroundWindow(h)
SendKeys.SendWait("MyUserName{TAB}MyPassword{ENTER}")
or similar.
 
Share this answer
 
Comments
CHill60 1-Feb-18 8:23am    
I see you got caught by a random resurrectionist :-D
OriginalGriff 1-Feb-18 9:30am    
Whoooooosh!

(That was the sound of your comment going right over my head!)


---
AH. I see what you mean. I didn't notice the date on that, it was in the homepage questions list IIRC... :blush:
---

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900