Solved

VBS Logon Script

Posted on 2009-07-01
5
550 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

685 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