|
★☆☆☆☆☆☆☆☆☆ |
积分:285 |
发帖:317 |
登录:2024/3/26 |
注册:2006/6/28 |
|
(1楼)【原创】一段利用WSH获取登录时间的代码
var enmProfile = new Enumerator(GetObject("winmgmts:").InstancesOf("Win32_NetworkLoginProfile"));
var arr = new Array("用户名\t最后登录时间");
while(!enmProfile.atEnd())
{
arr.push(enmProfile.item().Name + "\t" + enmProfile.item().LastLogon);
enmProfile.moveNext();
}
WSH.Echo(arr.join("\r\n"));
|