Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 569
  • Last Modified:

VBS Logon Script

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
RFEMHelpdesk
Asked:
RFEMHelpdesk
  • 3
2 Solutions
 
astroviperCommented:

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
 
kevin_uCommented:
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
 
kevin_uCommented:
I'm too slow i guess.
0
 
RFEMHelpdeskAuthor Commented:
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
 
kevin_uCommented:
thanks for the points.
sorry I just copied from your original post, didn't notice the two quotes.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now