Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Automatic Login For Website?

Hi, Im a noob programmer to vb and i was wondering how do i set up an automatic login to
This is what I have so far:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Automatic Website Login And Update Periodically
I am attempting to access a website to update a phone number every shift. My current program works at small time intervals, but I think the website is timing out when I attempt to set the time interval to 12 hours. For this reason, I wanted to login, make the updates, and close the form every shift. However, I cannot understand how to achieve this with my current program because I cannot get the form to reload. I have been banging my head against the wall on this for a week so any help would be greatly appreciated. Here is my code:

Imports System
Imports System.Web
Imports System.Text
Imports System.Threading
Imports System.Windows.Forms
Imports Microsoft.VisualBasic

Public Class Form1

'*** Troubleshooter Cell Phone Numbers ***
'*** Enter the Weekly Rotation ***
Const V As String = "92061111111"
Const W As String = "92062222222"
Const D1 As String = "92063333333"
Const E As String = "92064444444"
Const D2 As String = "92065555555"
Const T As String = "92066666666"
Const I As String = "92067777777"
Const C As String = "92068888888"
Const R As String = "92069999999"
'Sets up the forwarding call number rotation
Dim count As Integer
Dim countTrouble As Integer
Dim NextTrouble() As String = {I, D1, W, E, D2, R, T, C, V}
Dim NextTroubleCount As Integer = NextTrouble.Count()

'*** Login Requirements for Oncall Website ***
'Oncall Website
Dim URL As String = ""
Dim TargetFrame As String = ""
Dim Headers As String = "Content-Type: application/x-www-form-urlencoded " & vbCrLf 'Specificies POST data
'Username and Password for website login
Const Login As String = "123456"
Const Password As String = "987654"
'Saves string of html tags and corresponding values
Dim PostDataString As String = "userID=" & Login & "&password=" & Password & "&submit1=Log On&B1= OK "
'Converts unicode string to single byte character array
Dim [unicode] As Encoding = Encoding.UTF8
Dim PostData As Byte() = [unicode].GetBytes(PostDataString)

'*** Enter the Desired Start Time ***
Dim StartDate As Date = DateTime.Now 'Grabs the current PC date and time
Dim StartCmp As Date = #5/5/2008 8:00:00 PM# 'Sets the start time of application

Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load

'Starts the application at a specified time
While StartDate < StartCmp
StartDate = DateTime.Now 'Updates date and time variable
End While

'Navigate to URL

'Post data to URL
WebBrowser1.Navigate(URL, TargetFrame, PostData, Headers)

End Sub

Private Sub Form1_Activated(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Activated

'Handles security alert pop-up window

End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

'*** Scrolling update of forwarding call numbers *** (severe hack job should update at some point)
count = count + 1
If count = 2 Then
countTrouble = countTrouble + 1
count = 0
Thread.Sleep(600000) 'Test rotation time interval of 10 seconds
'Thread.Sleep(28800000) 'Set rotation time interval of 8 hours
'Thread.Sleep(43200000) 'Set rotation time interval of 12 hours
End If
If countTrouble = NextTroubleCount Then
countTrouble = 0
count = 0
End If

End Sub

Private Sub Trouble_Update(ByVal OnDeck As String)

'Indicates a desire to change the forwarding call number

'Updates the forwarding call number
WebBrowser1.Document.GetElementById("destination_{3DE6E6E2-833F-4FC1-92D3-F00B0056E70E}").SetAttribute("value", OnDeck)


End Sub

End Class

Automatic Upgrade From Website
Hi everyone! I have fallen into a big trouble:
I am actually developing a weather application that is
based on an Access archive. I need to make the main program
to automatically access to my site and download any existing
upgrade. Everything should be invisible to the user, i.e.
when the programs detects an internet connection then goes
and downloads the mdb file into the right directory.
Do you have any idea?
Thanks a lot

Automatic Login
is there a way to bypass the windows login. exactly, i need have a login name, and, of course a password, without having to type it in the windows login dialog box, someone has told me to put my initial login name, the one i want 2 use, and the pwd to an INI file. could someone tell me what INI file it is? tnx!

Automatic Upload Batch File To Website Using Vb
i am working on an integration project. i need to now how to post batch file after login into website and reach to that page where i can put the path and submit batchfile

immediate help wud be appreciated greatly!


Automatic Login As Admin.
Hello, can anyone tell me how I can use classic VB or ASP to login as an administrator to a client machine so I can install some software for them. By the way this is on XP platform. I am greatfull for any response.

Automatic Login Problems...
I got the login function to work, but there are problems for two of the sites i am trying.

the first one is, where the input boxes and submit button is located in main.htm. Due to some protection on the companies side, you can't visit the main.htm (unless you are viewing it through the link). is there any way to get around this?

secondly, it's I am trying to login on this page, but it doesn't work. don't know if its divided in a frame or what, but something is weird. I get the code to work on a page like, so I don't think that's the problem. The problem is probably due to the two pages and wondering if anyone know anyway to get around this...

additionaly, using the webbrowser control, is there anyway to stop javascript errors from poping up? would just like to stop the notifications of them...

any help would be appreciated!!


Automatic Login To Remote PC
Hi to all !

In my application when i use any print command , it fails ! becuase i was not connected to that remote Printer that is connected to remote pc. Then i have to connect that particular pc from network neighbourhood and have to supply username and password to access its resources.

I want to access that particular pc from VB doing some coding and providing username and password.

If you have some idea than please post it..

Regards !!

Automatic Login To Access Shared Folder
Hello All,

I have a shared folder on a remote computer(say computer name:COMP01).
When i try opening this folder it asks for the username and password.
I want to automatically login and access the shared folder using
Visual Basic 6.0.

I have tried using "senkeys" but doesnt seem to work probably because
i am unable to set the focus to the login window.Can anyone suggest
how i can solve this problem?


Send Email With Outlook With Automatic Login
How can I send an email with Outlook via Visual Basic automaticaly without the Outlook asks for the password?

Website Login
i was wondering if anyone can help me with my coding i have?what im trying to do is make a vb program that will login to my site witch i have done and works so far,the problem im having is i cant get it to tell me if im logged in or if the username or password is wrong anyone know how i can do this?im using inet here is what i have so far that works
Sub Chat_Login()
frmProgramLogin.Label3 = "Connecting"
Dim Try As String
Dim TheURL As String
TheURL = "" & frmProgramLogin.txtUserName & "&password=" & frmProgramLogin.txtUserPass
Try = frmProgramLogin.Inet1.OpenURL(TheURL)

End Sub

Website Login
I was wondering if anyone can help me. I've posted this message in the microsoft Access discussion forums but i have had no response jet.

I have a access2003 database and im trying to export a .xml file using the ExportXML method. I have been able to export to my website but i have to login manually (username and password)

Can VBA automatically login to my website without the need for manual login so my .xml file can be save to my website.

Any help would be very much appreciated

Login To Website
I've got a web browser control that attempts to load a site that I've entered but the site requires me to login first.

The problem is the form used to login uses the POST method so I can't use the below.

WB1.Navigate "
How do I POST the required information so I can be logged in and then browse to the pages I require?


Website Login
I tried finding ways to click the login button and submitting the form, but I can't figure this out. I'm trying to make a program to login to

I am able to insert my username and password but can't get it to actually login. You have to click a image for it to login. How would I go about doing this?

The source code for the login part of the page is

E-mail <br>
<font color="#ffffff"><input class="webforms" maxlength="100" size="15" name="email"></font>
<font color="#ffffff"><input class="webforms" maxlength="20" size="15" name="passwd" type="password"></font>
<input name="PHPSESSID" value="2d163c899b3b949bbe98ca78cde3cd99" type="hidden"><input name="form" value="sent" type="hidden"><input src="images/login.gif" value="Log in" class="formbutton" name="I1" border="0" height="25" type="image" width="95">

Using VB To Login On A Website
Hi. I have a webpage where a username and password is needed to login. I know it's easy to login via the webpage itself, but that's not what I want.

What I'd like to do is login via an application. The application has a webbrowser control, two textboxes (username / password) and a login command button.

Somebody types in the username and password in the TextBoxes on the application. Then clicks the login button and the username/password get passed from the application to the username/password boxes on the webpage and the person gets logged in.

In other words, how can I pass text from a VB TextBox to the textbox of a html webpage ?
Is this even possible ?

I've made a screenshot of a little example application to give a better idea of what I mean.


Login To A Website

is there any sample how to login to a website?

for example:

in form have two textbox one is for email and one is for password then a Button 'LOGIN' once it click open to any default web browser by computer and start browsing.. like in


Login To Website
hi to all,

i need some help about login to website.

i have a site (joomla) and i want members of my site can only login to my application..

is this possible?

server that i have host the site is

thanks for advice!

Login To Website
How can I do a program in vb which opens a ie and redirects to particular website.?

Login Into A Php Website
Hey,im wondering how to login into a php website many thanks using inet control

Login To Website
Hey,guys im wonder how i can login into a webpage through vb many thanks

Login To Website
I've got a web browser control that attempts to load a site that I've entered but the site requires me to login first.

The problem is the form used to login uses the POST method so I can't use the below.

VB Code:
WB1.Navigate ""

How do I POST the required information so I can be logged in and then browse to the pages I require?


Added RESOLVED to thread title. - Hack

Help With Website Login App
using VB 2005 Express

Hello, I am having some problems programming a website login app.

Some sites can use the "GET" method which is fine. I'm looking for a way to use the "POST" method.

I need my program to be able to open a web browser and run this html code:


<form method="post" action="https://www.***.com/LogIn.php">
<input type="hidden" maxlength="272" value=" [vb inserted username] " name="newuid">
<input type="hidden" maxlength="60" value=" [vb inserted password] " name="password1">
<input type=submit name=submit value=" Continue ">
<input type="hidden" name="action" value="login">

Then submit it, to login to the site. If anyone can please help me, that would be great. If anyone has an alternative way to obtain the same goal, that would be great too.

I am also willing to supply free hosting services for the person who can help make this possible. Thank you.


Website Login And Logout
i was wondering if anyone can help me out ok i have my vb project so that it will login to my website but now im trying to get it so it will logout here is the 2 strings for it any help will be great!
(1 my login string)" & frmProgramLogin.txtUserName & "&password=" & frmProgramLogin.txtUserPass (2 my logout string)

Auto-login To A Website?
Is there a way I can open an IE window, goto a website, enter a username and password, and "click" submit, all with the click of a button from my program?

I wrote a program for my department to track calls and do reports on the stats I gather. On the main screen we can pull up any of our users and one of the bits of information is their web site login and password. What I'd love to do is put a button next to that we could click on that would shoot us straight into the web site as that user.

The web site is ours, so I do have that advantage. Is there any special way the login would have to be set up to allow VB to do this?

Any help is appreciated. Thank you.


Login On Website To Get Info ....
Hello all,

this is my first quetsion here and i make it because
i couldnt find a solution myself.

For a project of mine i want to login into this site to get information from

I can login with my own ID there, which is not a problem.
I think the site works with cookies as a login-comfirmed
btw, and checks it each time u visit a website where
authorisation is required.

How can i login with VB6, get the cookie placed (idk where), and download the source code of the 2nd site, which i need.

Getting Information From A Website And Login
Hi all,

I'm making an application to check for new messages on a forum. I want user to be able to login. check to see if it was successful. If yes then go to Form2 else error message.

I have tried a few methods but none seem to work that well. Any ideas on how i could do this or if no one can think of anything i'll post the code i currently have and maybe people could help me adapt it??

If anyone could help with this it will be very greatful.

Thanks in advance,


WebSite Login - Not HTML

I did a search and I wasn't able to find anything on this topic. I'm trying to use VB to login to a site. Now if it was html, this would be super easy, but the only thing that makes this different is that when you go to the site, it brings up a NT login, or a windows login. I'm not sure how to give the site the user and password when its like this. I've tried playing with the webbrowser and the inet control. If anybody can give me a hint or point me in the right direction I'd really appreciate it.

Thanks in advance!

Login To A Website From Vb &amp; Save A File
How would i log into a place like and then edit one of my files, like save something new to it?

Login The Website With Username And Password?
Hi, guys
I need to store/upload several impornt excel data files to the each midnight. How could I write a VBA program that inputs the username and passward on the website automatically without any prompt alerts? How could I upload the files at some set time? thanks for any help.

How To Login And Download A File From A Website
How can I make my program to log into a web login page (PHP) and retreive (download) a file from a given link ?

What I am trying to do is - there's a website where users have to login to download a file. So users have two options - either they can open a browser and visit the site and login to download the file OR

or they can enter username and password in my VB app. The program should then login to the site and retreive the file (so that user do not have to leave the program and lauch a browser to retreive the file)


Submit/Login To Website Question
How do u login into a website by VB ?

Such as inputting JohnSmith in as there Yahoo Id, and then 12345678 as there password. Then submiting it to login in... like into...

Here is the login in data:

<form method="POST" action="members.php">
<input type="text" size="17" name="email">
<input type="password" size="17" name="password">
<input type="checkbox" value="1" name="remember"
<input type="submit" value="Login" name="submit"> <input type="hidden" value="1" name="login_submit">

Is there anyway I could make a button to fill out the required info?

Help Needed! Login &amp; Accessing Secured Website Using Vb 6
Dear Pros

i am working on an integration software. the scenario is, i have to upload (post) a batch file to a secure website in background and user wont see the interface of website.
i have used webbrowser tool to connect to website. i am successful in login but before that a security passport certificate is being asked.
my questions are :
1) how to execute security passport certificate
2) how to track sessionid of login
3) how to access or navigate further to reach to a perticular page
note : the website is menu driven

i requesst u please help me with some code or samples

thanks in anticipation


Automate Website Login With Webbrowser Control
Using VBA and the webbrowser control, I have to design a program that can login to a website, set a couple of checkboxes and click a button on a daily basis. The only snag I'm running into with it, is that I don't know how to pass my username and password to the login popup window that comes up when I navigate to the website. It's a separate popup window titled, "Enter Network Password".

WinInet API: Login Into A Website And Submit Info

I have to login in a web site and then submit some values to a form once I logged on in it. It involves 2 asp page. 1. Login.asp 2.SubmitVal.asp. I have to login first, otherwise whatever I submit in SubmitVal.asp would be invalid and I will be redirected to Login.asp. I tried to use WinInet Api to achieve this. I was successfully logged in and I got the cookie (login?session?) when I query the RAW_HEADER. But subsequent call to SubmitVal.asp fails. Could someone please help me to do it. Here is the sourcecode I use to connect to the site.


Dim hInternetOpen As Long
Dim hInternetConnect As Long
Dim hHttpOpenRequest As Long
Dim bRet As Boolean

hInternetOpen = 0
hInternetConnect = 0
hHttpOpenRequest = 0

hInternetOpen = InternetOpen("http generic", INTERNET_OPEN_TYPE_PROXY, "proxyserver", vbNullString, 0)

If hInternetOpen <> 0 Then
hInternetConnect = InternetConnect(hInternetOpen, "websiteaddress", INTERNET_DEFAULT_HTTP_PORT, vbNullString, vbNullString, _
Dim blnSet As Boolean
blnSet = False

If hInternetConnect <> 0 Then

hHttpOpenRequest = HttpOpenRequest(hInternetConnect, "POST", "/login.asp", vbNullString, "HTTP/1.0", 0, _

If hHttpOpenRequest <> 0 Then
Dim lpszPostData As String
Dim lPostDataLen As Long
Dim strPostHeader As String

Dim strString As String * 30000
Dim lngLength As Long
Dim lBytesRead As Long

lpszPostData = "loginuserid=username&loginpassword=password"
lPostDataLen = Len(lpszPostData)

strPostHeader = "Content-Type: application/x-www-form-urlencoded;Proxy-Connection: Keep-Alive"
bRet = HttpSendRequest(hHttpOpenRequest, strPostHeader, Len(strPostHeader), lpszPostData, lPostDataLen)
lBytesRead = 0

lngLength = Len(strString)

Call HttpQueryInfo(hHttpOpenRequest, HTTP_QUERY_RAW_HEADERS, ByVal strString, lngLength, 0)
Debug.Print strString
Call InternetReadFile(hHttpOpenRequest, strString, lngLength, lBytesRead)
Debug.Print strString

If bRet Then

hHttpOpenRequest = HttpOpenRequest(hInternetConnect, "POST", _
"/submitVal.asp", _
vbNullString, _
"HTTP/1.0", _
0, _

If hHttpOpenRequest <> 0 Then

strPostHeader = "Content-Type: application/x-www-form-urlencoded;Proxy-Connection: Keep-Alive"
lpszPostData = "value1=<somevalue>&value2=<some value>"
lPostDataLen = Len(lpszPostData)

bRet = HttpSendRequest(hHttpOpenRequest, strPostHeader, Len(strPostHeader), lpszPostData, lPostDataLen)

If (bRet) Then
Call HttpQueryInfo(hHttpOpenRequest, HTTP_QUERY_RAW_HEADERS, ByVal strString, lngLength, 0)
Debug.Print strString
Call InternetReadFile(hHttpOpenRequest, strString, lngLength, lBytesRead)
Debug.Print strString
End If
End If
End If
End If
End If
End If

' Close all handles
If hInternetOpen <> 0 Then
bRet = InternetCloseHandle(hInternetOpen)
End If

If hInternetConnect <> 0 Then
bRet = InternetCloseHandle(hInternetConnect)
End If

If hHttpOpenRequest <> 0 Then
bRet = InternetCloseHandle(hHttpOpenRequest)
End If

How Do I Make It Login In At A Distant Website Using Vb6? -and By Useing A .txt File
im making a program that will open a username from a .txt file and a password from a .txt file, it's most like a basic auth for my program. I will probally make the program connect to a php file to see if the authorization is correct and the user will have to make their own txt file and write in the username i gaven them and do the same with the password... (I know there are many other login functions but I want it this way only.)

lets say the website looked like this;

So what im really asking is, how do I make the visual basics read a username from a .txt file and put the first word it see's onto the browser? then read the password file (.txt) and put in on the browser at the same time and press enter?

this is what I thought the code might of looked like

VB Code:
Private Sub Home_Click()x = text1Print "Text1"y = text2Print "text2"Shell ("explorer End Sub[b]x[/b]?pass=[b]y[/b]")

that coding probally get's you confused much as I. Thats why im asking if you have any idea on how to do this? even a suggestion in how to code this would be great! Im stuck on this one part so please help me


Website Login - Usual Methods Aren't Working

I did a search and I wasn't able to find anything on this topic specifically. I'm trying to use VB to login to a site. Now if it was html, this would be super easy, but the only thing that makes this different is that when you go to the site, it brings up a NT login, or a windows login. I'm not sure how to give the site the user and password when its like this. I've tried playing with the webbrowser and the inet control. I've also tried http://username : (I had to space it so it wouldn't make the the smilie face) but that only gets a not found page. If anybody can give me a hint or point me in the right direction I'd really appreciate it.

Thanks in advance!

Please Help) A VB Program That Can Enter Login And Passwords To WebSite, Kinda Like GATOR
Does anyone know of any vb code files I can download that can do this.
I have read and tried many of the examples ive seen thus far but just cant get them to work.
Any Help would be appreciated!

Yah, Ive been usin VB four five years,
But I still know nothing.

Edited by - philio63 on 3/2/2002 2:23:33 PM

Web Site Auto-login Post (login And Password)
Hi, I'm building a small project and I'm hitting a brick wall. I would like to build a small VB app to post the user name and password to sites (http and https) such as yahoo mail, ebay, etc... I've been looking at inet and wininet and not having much luck.

If any one has code examples on how to do this or simular that I could view that would be great.

thanks and have a great day.

Login A User To Windows (known Password, Known Name, Just Do The Login)
I think the title says all about it... I just need a simple code ( Login(Username as String, Passwort as String) ) that does the Windows Login.

When the computer boots up, a form appears and by just klicking a button a user should be logged in. Thats all i need

Sending Login/password To Internet Browser Login/password Box
Once a browser has visited a URL that my program told it to visit how can i make my program enter in the login/password for that url if one comes up. How could it enter the login/pass for netscape and IE browsers.

Thanks in advance for your help.

Automatic DSN
Hi everybody,

When using Oracle with VB ( with DSN ) one has to create a DSN
first on the clients PC. Is there any way to do this at run time and
no need to create a DSN thru' ODBC

have a nice day


How can I make My programme open as soon as I log in, like MSN does?

Automatic Log Off
How do I log off my vb application automatically after some time?

Automatic Name
Thanx in advance...

I was checking out the "how to zip in VB" in here

how do I make it so the output zipped file gets the same name it had b4 getting zipped, instead of the "TEST_ONE" like the example... I know where to change it, but dont know how to.

Example, if a zipped a file named MMM_HCFA.dat the output file would be

Thanx again.

Automatic it possibloe to make an app that will..simulate a right-click then a key press? so it will right-click in another program..and control it? using the defined clicks and keys?

Automatic Log-in Under Win NT4.0
I want to run a program during the night with a Scheduled Task. But, to make it run properly, I have to be logged in under a certain account...
How can I make a log in with a username and a passwrd in a vb program ???

Automatic Exe Of An App
hi people! how are you?

This is a small question... i have an vb application that has to gather large amount of data once a day at midnight... without the interference of any user.

How do i start my app? my using a schedualer? timer? i am not familiar with those.. Can somebody tell me very shorthly how it works. ( service, stay in memory?)

Thank you

Automatic Installing From Cd
Hey I Allmost finished my app.
Now I need my app to launch "acrobat reader setup" file automatic from cd. I only now that the "Acrobat Reader setup" file will be in a folder "AcrobatAcroReader51_ENU"

The problem, If a user have more then one cd-rom how can I tell my app to look for the "AcroReader51_ENU" file?

Automatic Run Exe After A Reboot
Where I must to configure for that my VB application run directly after a reboot ?
I think that this must doing with the package of the VB application !

Thank you to answer me

Best Regards


Automatic Tiling?
How do you get it done automaticly without having to click a button like you have to in the movemnt demo?

Copyright 2005-08, All rights reserved