action="">
>
type="text/javascript">
var network = new
ActiveXObject("WScript.Network");
document.Master.TerminalId.value = network.ComputerName + "." +
network.UserDomain;
//alert(network.ClientName);
//alert(sys);
//var
sh = new ActiveXObject("WScript.Shell")
//var sys =
sh.ExpandEnvironmentStrings("%CLIENTNAME%")
//alert(sh.clientAddress);
//var
WTS = new ActiveXObject("WTSManager.Shell")
//alert(WTS.MyClientName + " My
IP address: " + WTS.MyIPAddress);
if(sys == '%CLIENTNAME%')
sys =
network.ComputerName;
if(Server == sys)
Server =
network.UserDomain;
type="text/javascript">
alert(sys + " - " + server + ' - ' +
network.UserDomain);
The script will fetch the parameter from the ysstem variable and extract the computer name logged in or the current one.
Monday, January 12, 2009
Retrieving Computer name using scripts (works on Remote system)
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment