|
I need to retrieve the environment variables from the client using Java or Javascript. Can anyone help?
|
|
|
I know you said Java or Javascript, but I thought I`d pass this along just in case it helps you find a javascript equivalent. Here is how to retreive the client`s environment variables using client-side VBScript in an HTML page. (Note: if you run this, your browser may warn you that an ActiveX script is trying to run and ask you to OK it.)
<html>
<script language=vbscript>
Set Shell = CreateObject("WScript.Shell")
CompName = Shell.ExpandEnvironmentStrings("%COMPUTERNAME%")
alert(CompName)
</script>
</html>
|
|
|
|
|
Is there any method to find out the users' domain name and or work group too?
The reason I ask is that im trying to create a form which users will post their name and address details, but at the same time will also log their machine name, work group (if applicable), and domain name.
Also, if by using the method that you've described already can be written to a variable rather than displayed on screen, can that variable then be used in asp (since i notice its vb script)?
|
|
|
Thank you very much for your time and effort to post that code - it has come in _very_ useful!
I was beginning to think asp couldnt do what I was asking it to do...
Thank again!
Chris
|
|
|
|
|
|
|
|