Code ASP:
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
 
<%
	Sub Initialize
		Dim oShell
		Set oShell = Server.CreateObject("Scripting.Shell")
		strUserName = oShell.ExpandEnvironmentStrings("%USERNAME%")
		strUserDomain = oShell.ExpandEnvironmentStrings("%USERDOMAIN%")
		UserName.innerHTML = strUserName
		UserFullName.innerHTML = strUserDomain
	End Sub
%>
 
<body onload="Initialize()">
 
    <span id = "UserName"></span>
    <span id = "UserFullName"></span>
 
</body>
</html>

I am getting an object required on line 11 which is the Dim statement.
I know the innerHTML won't work in here so that'll be next. I can't image that is my current issue as I can't even get that far.

When I debug the program in VStudio I get the following
"Microsoft JScript runtime error: Object expected.
Am I using correct call on the body onload?
It just seems that is a JavaScript function but I'm not sure if it works with VBScript or not.