Solved

VBS Logon Script

Posted on 2009-07-01
5
547 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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

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 …
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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