Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript - Get the logged on user

Status
Not open for further replies.

comaboy

Programmer
Nov 6, 2001
261
GB
Hi guys,

I'm running a restricted subweb and whan to grab the logged on username. I would use the ASP
Code:
Request.ServerVariables("LOGON_USER")
BUT the site is not ASP-enabled, so i need to use plain ol' VBScript. Basically what I'd like to is shown in the code snip below. I realize it's incorrect but it explains better that plain text!

Code:
<script LANGUAGE=&quot;VBScript&quot;> 
<!-- 
sub window_onLoad()
If LCase(Logon.User)=&quot;guest&quot; Then 'Logon.User??
	window.navigate(&quot;users/request_password.htm&quot;) 
End If
End Sub
--> 
</script>

Can anyone point me in the right direction?

Thanks In Advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top