Mark Eckrode
asked on
Can I pass my http referer through my VBScript?
I am trying to run the below script to allow my users a one click login to Relias training that inserts their AD GUID into the link, however they require a http referer to complete the login. Whether I run this from the vbs file or launch it from a button on my intranet the referer is hidden or missing. Any ideas on how I can pass my referer or set one in the code?
Sub GUID()
' NameTranslate constants Const ADS_NAME_INITTYPE_GC = 3 Const ADS_NAME_TYPE_NT4 = 3 Const ADS_NAME_TYPE_GUID = 7
Dim strDN Dim wscript
Set wscript = CreateObject("Wscript.Shell")
' Determine the NetBIOS name of the domain and the NT name of the current user. Set objNet = CreateObject("WScript.Network") strNT4Name = objNet.UserDomain & "\" & objNet.UserName
' Use the NameTranslate object to convert the NT user name to the GUID Set objNameTranslate = CreateObject("NameTranslate")
' Initialize NameTranslate by locating the Global Catalog. objNameTranslate.Init ADS_NAME_INITTYPE_GC, ""
' Use the Set method to specify the NT format of the object name. objNameTranslate.Set ADS_NAME_TYPE_NT4, strNT4Name
' Use the Get method to retrieve the GUID string.
strDN = objNameTranslate.get(ADS_NAME_TYPE_GUID)
CreateObject("WScript.Shell").Run(http://<mycompany>.training.reliaslearning.com/clink.aspx?username="+strDN+"&ad=1")
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.