Code here
var reg = win.reg("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList") //定义注册表路径
var ldap=""
reg.enumKey(
function(subKey, keyname){
if(string.startWith(keyname,"S-1-5-21")=true ) and (win.reg("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\"+keyname).queryValue("ProfileImagePath")="C:\Users\"+sys.getUserName())
ldap = keyname //
}
)
-----
都来测试