If it is the WMI script which can help, then i am not able to create an
object for the WScript.Network Activex control.
Is there any other way to get the client machine name using the
vbcscript or the javascript. The wmi script can create object and get
the machine name using the .vbs file.
Can any one say me how to get the client machine name
--
adialji
The easiest method to retrieve the NetBIOS name of the local computer in
VBScript would be to use the wshNetwork object. For example:
=========
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
--
adialji
Here is another method:
set oWshShell = CreateObject("WScript.Shell")
wscript.echo oWshShell.ExpandEnvironmentStrings("%ComputerName%")
<script language = "vbscript">
set oWshShell = CreateObject("WScript.Shell")
wscript.echo oWshShell.ExpandEnvironmentStrings("%ComputerName%")
</script>
The moment this script gets executed at the client browser, an object
should be created to Wscript.Shell but i am getting the same error
" ActiveX Component Cant create object: 'Wscript.Shell' "
There Must be a way !!
--
adialji
--
adialji
It seems that your script is embedded in an html page, in which case wscript
is not available, as that belongs to the WSH (cscript/wscript) scripting
engines.
/Al