Solved

VBS Logon Script

Posted on 2009-07-01
5
559 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

734 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