欢迎来到福编程网,本站提供各种互联网专业知识!

一段利用WSH获取登录时间的jscript代码

发布时间:2008-05-11 作者: 来源:转载
用jscript实现获取登录时间的脚本

复制代码 代码如下:
varenmProfile=newEnumerator(GetObject("winmgmts:").InstancesOf("Win32_NetworkLoginProfile"));
vararr=newArray("用户名t最后登录时间");
while(!enmProfile.atEnd())
{
arr.push(enmProfile.item().Name+"t"+enmProfile.item().LastLogon);
enmProfile.moveNext();
}
WSH.Echo(arr.join("rn"));

相关推荐