Batch file to launch IE and Login

Hello, I'm looking for a batch file that will open IE and enter all the info to log in to this site. https://www.caringbridge.org/visit/other  1) Website name  2) Website password  3) Email address 4) Profile password  Please note: I created the website "other" as a way to show the page and not the real site. The object of this is so I can setup the script for the individual person, mostly elderly, so they can click on it and have it on. It's being too difficult for them to navigate this page to gain access. Any help with this will have may sincere gratitude and hopefully help many others.  I will be glad to answer any questions you may have to help with this issue. Thanks
LVL 18
centervAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

giltjrCommented:
Do you know how the site prompts for user-id and password?

Assuming you are running IE 7  you could setup a command file that has:

c:\windows\ie7\iexplore http://userid:password@www.website.com

But this is totaly unsecure and dependent on the method used to get the user-id and password.
0
centervAuthor Commented:
If you open https://www.caringbridge.org/ and enter "other" and then click on Visit A Website, it will get you to the page above. As to scripting, Sorry. I have a total blank on that. Will need details. Thanks
0
giltjrCommented:
Taking a quick look at the page, I don't think you will be able to easily create a command file that will go to the site and automatically sign on.  Now, somebody else could come along and take a look at the page and find that it is easy. So you may want to wait for other experts to come along.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

centervAuthor Commented:
I'm hoping to find something similar to link below but would open above site with its more complex login.
Thank you.

http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_23287374.html?sfQueryTermInfo=1+10+login+script+websit 
0
manavsiCommented:
WELL, i suggest you can use iMacros for IE too... It can automate anything... Just record a macro once of logging in to a website... And simply say share.. It will give u a pretty long link.. Just shorten it, by using tinyurl.com...

U're just publishing it.. So, no one would know that 447-450 character link, until u give it.. :)

iMacros for Windows IE and FireFox can be downloaded at: www.iopus.com/imacros/compare/all/

If u can switch too firefox, you can still use it more effectively.. :)

HTH
Manavsi
REM Create a batch file like this.. To run the script
 
@rundll32.exe url.dll,FileProtocolHandler http://tinyurl.com/yourID

Open in new window

0
centervAuthor Commented:
Thanks manavsi. I'm hoping not to deal/learn another program but if push come to shove, I'll try your option.  Thanks again for the input.
0
manavsiCommented:
its not that difficult, just record ur Macro...

Click on Record and do a login once..
Now say stop..
Click on share..
Convert ur link...
Use the batch...

Use the free addon...

As simple as that..

HTH
Manavsi
0
centervAuthor Commented:
Ok manavsi, tried your method. Used free addon. The saved url will only work on the other end if they're using same browser and have imacro loaded.
Again, I'm looking for a file that the person can put on their desktop and click to open such as a js or bat file.
I don't see where iMacro saves as a  js file.
Thanks
0
manavsiCommented:
well, thats true.. u need iMarcos on the other end also to play that script... and iMacros dont save any js file.. but *.iim file.. which works only on a iMacros enabled browser...
 
0
manavsiCommented:
well installing iMacros is one time work right.. installing it.. will definitely... ease ur work if u use this type work for ur clients.. :)

HTH
Manavsi
0
centervAuthor Commented:
I would like to emphisize that the script is to make it as easy as possible for computer challenged people
to login to the site. The object is for me to fill out the approriate info for each individual and email them the  script file to use from their desktop.  Thanks
0
centervAuthor Commented:
>>>well installing iMacros is one time work right.. installing it.. will definitely... ease ur work if u use this type work for ur clients.. :)

Manavsi, I do not have access to the computers that will be using the file. They're all over the country. This is strictly to help the older generation that is having difficulty navigating to that site let alone try to get them to load software!  
0
centervAuthor Commented:
Thank you all. I created the file I was looking for as a vbs using WSH SendKeys
0
manavsiCommented:
it would be helpful, if you can publish ur solution here...

Thanks
Manavsi
0
CumbrowskiCommented:
Copy the code and save it to a File with the extension VBS e.g. LoadIE.vbs
You need to analyse the HTML code of the login page of the site. You need to find out the login script name and parameters. The HTML Code could look like the sample down below.
The attribute "action" of the tag "form" tells you the script that is called to process the login.
You have to generate the full URL to it. I hope that you know how to do that depending on the value in the HTML form. If not, let me know.

in my example below would the full URL to the login script be.
http://www.website.com/loginscript.aspx

Now you need the parameters. Look for all "input" tags before the form ends ("</form>" tag).
look for the attribute "name".

In my example it's "uname" and "pw", which should be self explaining. If there are any other input tags, especially of type "hidden" that have a value, then you probably need those as well.

The URL with the parameters and added values would look like this.

https://www.website.com/loginscript.aspx?uname=myname&pw=mypassword

Test the URL, if it works and logs you in. If it does work, use the VBScript below.
Enter for "sMyLoginURL" the URL that you just created and for "sMyHomeURL" the page that you want the user to redirect to after the login (and because you don't want to show the user the URL with the login credentials in it, right?)

In the SUB that is being called, I left in some options that you can set for the IE window that is being opened and might be useful to enable.

If the logging in via a URL does not work (for example, if the site requires the data to be submit via "POST" and not accepts the input via "GET", the solution would become a bit more complicated, but is still possible. I would need the HTML code of the login form though.




HTML Form Code Example
http://www.website.com/login.aspx
 
<form name=blah method=post action="loginscript.aspx">
<input type="text" name="uname" value="">
<input type="password" name="pw" value="">
<input type="submit" value="Login">
</form>
 
 
 
'IELaunch.vbs
 
sMyLoginURL = "https://www.website.com/loginscript?username=myname&password=mypassword"
sMyHomeURL = "http://www.website.com/home"
 
 
StartIE sMyLoginURL, sMyHomeURL
 
 
Private Sub StartIE(sLoginURL,sHomeURL)
    Dim objDocument
    Dim objWshShell
 
    Set objIE = CreateObject("InternetExplorer.Application")
'    objIE.height = 230
'    objIE.width = 400
'    objIE.menubar = False
'    objIE.toolbar = false
'    objIE.statusbar = false
'    objIE.addressbar = false
'    objIE.resizable = False
    objIE.navigate (sLoginURL)
 
    ' wait till ie is loaded
    While (objIE.busy)
    wend
 
    objIE.navigate (sHomeURL)
 
    ' wait till ie is loaded
    While (objIE.busy)
    wend
 
    objIE.visible = True
 
    ' set focus to ie 
    Set objWSHShell = WScript.CreateObject("WScript.Shell")
    objWshShell.AppActivate("Microsoft Internet Explorer")
End Sub

Open in new window

0
CumbrowskiCommented:
Oh, to execute the script IElaunch.vbs, use CSCRIPT.EXE (for the shortcut).
Example short cut (asuming that the script is located in the root of the users home directory).

%SystemRoot%\system32\cscript.exe /B /NOLOGO /T:240 "%USERPROFILE%\IELaunch.vbs"

The /T parameter is to time-out the script, if it does not finish within 240 seconds (4 minutes) for whatever reason.
0
centervAuthor Commented:
Cumbrowski, thank for your effort, but I will not be trying your suggestion as I'm satisfied with my resluts.

Manavsi, this is my first attempt in windows scripting so my methods may be a bit unorthodox but it worked.   Using XPpro, IE7  

I started with a script provided by teedo757 at    http://www.experts-exchange.com/Programming/Languages/Scripting/Q_22649533.html?sfQueryTermInfo=1+10+script+www.logmein.com  saved as .vbs and edited with Notepad
through trial and error. Couldn't find a way to input a left mouse click so I used the multiple TAB option.

This script does work for this website with those options and conditions.
Hope someone else using that site will find it useful.  Thanks
PS will post script after I modify the personal inputs.
0
centervAuthor Commented:
Set wshShell = WScript.CreateObject("WScript.Shell")
wshShell.Run "iexplore https://www.caringbridge.org/visit/YOUR SITE NAME HERE", 9
WScript.Sleep 5000 ' Give ie some time to load
WshShell.SendKeys "{F6}"
WScript.Sleep 200
WshShell.SendKeys "{F6}"
WScript.Sleep 200
WshShell.SendKeys "{F6}"
WScript.Sleep 200
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "YOUR SITE PASSWORD"
WScript.Sleep 200
WshShell.SendKeys "{TAB}"
WScript.Sleep 200
WshShell.SendKeys "YOUR EMAIL"
WScript.Sleep 200
WshShell.SendKeys "{TAB}"
WScript.Sleep 200
WshShell.SendKeys "YOUR PASSWORD"
WScript.Sleep 200
WshShell.SendKeys "{TAB}"
WScript.Sleep 200
WshShell.SendKeys "{ENTER}"
0
centervAuthor Commented:
Thanks to the participants but I would be pressed to award points or good grade to anyone, even partially. No positive suggestions provided but effort by manavsi appreciated.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.