Hi,


We used WSH (Windows Scripting Host) to get that information (only on intranet
pages only - security rule and also if the request is from an internal page vs
an external page - the external pages script is not allowed to run (so I have
been told)). Here is a sample of what we used - might make into a dll or look
to see if we can can use some form of Java to retrieve this info now with MX
since we are trying to stop using Active X.


<script language="_javascript_">
   var WshNetwork = new ActiveXObject("WScript.Network");
   var oDrives = WshNetwork.EnumNetworkDrives();
   var oPrinters = WshNetwork.EnumPrinterConnections();
   alert("Domain = " + WshNetwork.UserDomain);
   alert("Computer Name = " + WshNetwork.ComputerName);
   alert("User Name = " + WshNetwork.UserName);
   alert("Network drive mappings:");
   for(i=0; i<oDrives.Count(); i+=2){
      alert("Drive " + oDrives.Item(i) + " = " + oDrives.Item(i+1));
   }
   alert();
   alert("Network printer mappings:");
   for(i=0; i<oPrinters.Count(); i+=2){
      alert("Port " + oPrinters.Item(i) + " = " + oPrinters.Item(i+1));
   }
   
</script>


Mario

-----Original Message-----
From: Whittingham, P [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 09, 2004 11:41 AM
To: CF-Talk
Subject: RE: Workstation name ?

Hi,

  We created a vb (dll) to get that information  and used _javascript_ to
retrieve that information. WSH might work also, but we turned that off since
it can be used by hackers.

TIA,
Patrick Whittingham
United Space Alliance

-----Original Message-----
From: John Beynon [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 09, 2004 11:15 AM
To: CF-Talk
Subject: RE: Workstation name ?

What about using the IP address of the workstation and then doing a DNS
lookup for it's information, or a WINS lookup if in a private Windows
network.

-----Original Message-----
From: Deva, Ramesh X [ECCO Select] [mailto:[EMAIL PROTECTED]
Sent: 08 March 2004 23:23
To: CF-Talk
Subject: Workstation name ?

Hi,

How do i know my workstation name thru programatically?
Is there any custom tag is available ?

Thanks
Ramesh
  _____
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to