Question

Batch file to launch IE and Login

Asked by: centerv

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

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-05-20 at 20:01:14ID24426588
Tags

Windows Batch Scripting

,

Microsoft Programming

,

Javascript

Topic

Windows Batch Scripting

Participating Experts
3
Points
0
Comments
19

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. launching a NT batch file
    On my NT Cold Fusion server, is it possible to launch a batch file from within a cfm document?. I have a form that users input information into, this is written to a file. Then I need this batch file to run immediately to process the data and distribute it.
  2. Batch for launching and killing programs
    I have to create 2 batch files. One for launching few programs with delay let say 5 sec and second batch file to kill this programs that where lunched. Please help
  3. Launch a batch file with VBScript
    All I am looking to do is have a VBScript dialog box that appears with some text and then two buttons side-by-side, each button will launch a different batch file and close the dialog box. Does anyone have something in mind?

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: giltjrPosted on 2009-05-20 at 20:10:22ID: 24437933

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.

 

by: centervPosted on 2009-05-20 at 20:17:51ID: 24437955

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

 

by: giltjrPosted on 2009-05-20 at 20:23:56ID: 24437973

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.

 

by: centervPosted on 2009-05-20 at 20:28:54ID: 24437983

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

 

by: manavsiPosted on 2009-05-20 at 20:39:21ID: 24438004

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

                                              
1:
2:
3:

Select allOpen in new window

 

by: centervPosted on 2009-05-20 at 20:48:11ID: 24438020

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.

 

by: manavsiPosted on 2009-05-20 at 21:24:44ID: 24438105

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

 

by: centervPosted on 2009-05-21 at 06:10:18ID: 24440944

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

 

by: manavsiPosted on 2009-05-21 at 07:37:26ID: 24441950

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...
 

 

by: manavsiPosted on 2009-05-21 at 07:40:24ID: 24441993

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

 

by: centervPosted on 2009-05-21 at 07:47:42ID: 24442069

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

 

by: centervPosted on 2009-05-21 at 07:55:31ID: 24442165

>>>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!  

 

by: centervPosted on 2009-05-21 at 21:51:51ID: 24447821

Thank you all. I created the file I was looking for as a vbs using WSH SendKeys

 

by: manavsiPosted on 2009-05-21 at 21:59:18ID: 24447843

it would be helpful, if you can publish ur solution here...

Thanks
Manavsi

 

by: CumbrowskiPosted on 2009-05-22 at 00:09:00ID: 24448322

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

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:

Select allOpen in new window

 

by: CumbrowskiPosted on 2009-05-22 at 00:14:37ID: 24448342

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.

 

by: centervPosted on 2009-05-22 at 05:38:20ID: 24450155

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.

 

by: centervPosted on 2009-05-22 at 05:45:10ID: 24450211

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}"

 

by: centervPosted on 2009-06-03 at 05:26:20ID: 24535617

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.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...