Solved

VBS Logon Script

Posted on 2009-07-01
5
546 Views
Last Modified: 2012-06-21
Recently our firm implemented an online Time and Labor application. The IT Department has been asked to make this webpage come up at login, We have managed to get the webpage to launch using the code belowhowever, we would like to populate the first 2 fields Client ID (this is a static entry which is enterd in alias below) and Login ID - which is the domain username. Please assist us in passing the username to the URL below in this script.

Thank you in advance.
Case "NON-EXEMPT"

	    Set oIE = WScript.CreateObject("InternetExplorer.Application") 

	    oIE.Visible = True 

	    oIE.Navigate(""https://timeandlabor.paychex.com/secure/login.asp?Alias=XXXXXXXX&Login=THIS IS THE USERNAME I NEED TO ADD")

Open in new window

0
Comment
Question by:RFEMHelpdesk
  • 3
5 Comments
 
LVL 3

Accepted Solution

by:
astroviper earned 350 total points
ID: 24760133

Dim objNetwork

Set objNetwork = CreateObject("WScript.Network")

Set oIE = WScript.CreateObject("InternetExplorer.Application") 

oIE.Visible = True 

oIE.Navigate("https://timeandlabor.paychex.com/secure/login.asp?Alias=XXXXXXXX&Login=" & objNetwork.UserName)

Open in new window

0
 
LVL 12

Assisted Solution

by:kevin_u
kevin_u earned 150 total points
ID: 24760138
This should work.
Case "NON-EXEMPT"

             Set WshNetwork = CreateObject("WScript.Network")

	    Set oIE = WScript.CreateObject("InternetExplorer.Application") 

	    oIE.Visible = True 

	    oIE.Navigate(""https://timeandlabor.paychex.com/secure/login.asp?Alias=XXXXXXXX&Login=" & WshNetwork.UserName)
 
 

 

Open in new window

0
 
LVL 12

Expert Comment

by:kevin_u
ID: 24760142
I'm too slow i guess.
0
 

Author Closing Comment

by:RFEMHelpdesk
ID: 31599050
Thank you Experts for your speedy resolution. I have tested and implemented. Both options work great !

PS : Kevin u - You had an extra " at the start of the web link.

0
 
LVL 12

Expert Comment

by:kevin_u
ID: 24760414
thanks for the points.
sorry I just copied from your original post, didn't notice the two quotes.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now